MySQL/phpMyAdmin从DELIMITER冻结 [英] MySQL/phpMyAdmin freezes from DELIMITER

查看:74
本文介绍了MySQL/phpMyAdmin从DELIMITER冻结的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行此过程会导致MySQL(或phpMyAdmin)冻结.我必须使用XAMPP命令停止MySQL,该命令会冻结并在停止前约20秒无响应".我相信这是由定界符命令引起的,它本身就开始出现问题.我尝试使用其他定界符("//")无效.

Running this procedure causes MySQL (or phpMyAdmin) to freeze. I have to stop MySQL with from XAMPP command, which freezes and "is not responding" about 20 seconds before stopping. I believe this is caused by the delimiter command, which on it's own begins the problems. I have tried using a different delimiter ("//") to no effect.

DELIMITER $

CREATE TRIGGER coroner AFTER INSERT ON events
FOR EACH ROW BEGIN
UPDATE teams WHERE id = NEW.victim SET live = live-1;
UPDATE teams WHERE id = NEW.shooter SET score = score+points;
END

$

DELIMITER ;

推荐答案

事实证明,phpMyAdmin在SQL查询框下面有一个标记为"delimiter:"的字段.使用它而不是命令可以解决问题.进一步的研究表明,"DELIMITER"不是SQL命令,而是通常由所有SQL ui实施的命令.

As it turns out, phpMyAdmin has a field marked "delimiter:" below the SQL query box. Using it rather than the command solves the problem. Further research explains that "DELIMITER" is not a SQL command, but a command generally implemented by all SQL ui's.

这篇关于MySQL/phpMyAdmin从DELIMITER冻结的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆