执行语句:
create procedure sleep_test (in sleeptime int)
begin
declare wait_until timestamp;
set wait_until = (current timestamp + sleeptime seconds);
while (wait_until > current timestamp)
do
end while;
END
一直报错
解决办法:修改语句为@结尾,并且修改客户端的sql配置,在窗口-》首选项中,(1)将语句分隔符改成@ (2)勾选忽略本地分隔符
SQL语句为:
create procedure sleep_test (in sleeptime int)
begin
declare wait_until timestamp;
set wait_until = (current timestamp + sleeptime seconds);
while (wait_until > current timestamp)
do
end while;
END@