MySQL/phpMyAdmin freezes from DELIMITER(MySQL/phpMyAdmin 从 DELIMITER 冻结)
问题描述
运行此程序会导致 MySQL(或 phpMyAdmin)冻结.我必须使用 from 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"不是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 冻结的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:MySQL/phpMyAdmin 从 DELIMITER 冻结
基础教程推荐
- SQL Server 实例在登录协商期间返回无效或不受支持的协议版本 2021-01-01
- SQL 效率:WHERE IN 子查询 vs. JOIN 然后 GROUP 2021-01-01
- 如何使用 mysql.connector 禁用查询缓存 2022-01-01
- 是否可以执行按位分组功能? 2021-01-01
- 无法解决整理冲突 2021-01-01
- SSMS 中的权限问题:“对象 'extended_properties'、数据库 'mssqlsystem_resource'、... 错误 229)上的 SELECT 权限被拒绝" 2022-01-01
- SQL:使用来自具有相同列名的两个表中的数据... 2021-01-01
- 在 SQL 中连接多个表 2021-01-01
- 需要 MySQL 5.1 中的抽象触发器来更新审计日志 2021-01-01
- 将 SQL Server DateTime 列迁移到 DateTimeOffset 2021-01-01
