use monitoring;
delimiter $$
create procedure xyd_add_test_data(in count int)
begin
declare i int default 1;
add_data: loop
INSERT INTO devs( hostname, ip_address, mac_address, unit, department, online_time, last_uptime)
VALUES(concat('testhost-', i), inet_aton('127.0.0.1'), conv('FCAA143AD605', 16, 2), '测试单位', '测试部门', 206.449, now());
set i = i + 1;
if i >= count then
leave add_data;
end if;
end loop;
end$$
delimiter ;
call xyd_add_test_data(1000)