drop database database test_uuid;
create database test_uuid;
use test_uuid;
drop table test_id;
create table test_id (
  id int not null auto_increment,
  name varchar(128),
  primary key(id)
);

DROP PROCEDURE LoopDemo;
 
DELIMITER $$
CREATE PROCEDURE LoopDemo()
BEGIN
    DECLARE x  INT;
        
    SET x = 1;
        
    loop_label:  LOOP
        IF  x > 1000000 THEN 
            LEAVE  loop_label;
        END  IF;
            
        SET  x = x + 1;

        insert into test_id (name) values ('Reading table information for completion of table and column names');

    END LOOP;
END$$

DELIMITER ;


CALL LoopDemo();

-- my.cfn выключен синхронный режим
-- insert: 1_000_000
-- Query OK, 1 row affected (22.35 sec)

-- time echo "use test_uuid; select * from test_id" | sudo mysql >/dev/null
-- real	0m0.899s
-- user	0m0.613s
-- sys	0m0.044s
