我有以下程序,当我手动导入时,由于某种未知原因而中断。
CREATE PROCEDURE `register_house`(
IN UID CHAR(17),
IN new_username VARCHAR(16),
IN new_signature CHAR(64),
IN email VARCHAR(128),
IN postcode VARCHAR(16),
IN customer_name VARCHAR(45),
IN phone_number VARCHAR(16)
)
BEGIN
UPDATE bb.checkin SET username = new_username, signature = new_signature WHERE _site = UID;
END
我在Mysql Workbench中遇到以下错误 -
Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 11
有人可以提出问题所在吗?
如我所知,我已修改为包含DELIMITER,现在出现以下错误:
Error Code: 1728. Cannot load from mysql.proc. The table is probably corrupted
这些表格看起来都是正确的,这是“去腐败”的方法。如果他们以某种方式腐败了吗?
答案 0 :(得分:1)
根据https://stackoverflow.com/a/639356/2381157,试试这个
delimiter //
CREATE PROCEDURE `register_house2`(
IN UID CHAR(17),
IN new_username VARCHAR(16),
IN new_signature CHAR(64),
IN email VARCHAR(128),
IN postcode VARCHAR(16),
IN customer_name VARCHAR(45),
IN phone_number VARCHAR(16)
)
BEGIN
UPDATE bb.checkin SET username = new_username, signature = new_signature WHERE _site = UID;
END
//
delimiter ;
它在MySQL 5.5中适用于我
答案 1 :(得分:0)
这对我有用......
将此添加到第1行语句的开头;
DELIMITER $$
然后在ver
END $$
然后最后修复'损坏的'消息我只是运行以下文件:
C:\xampp\mysql\bin\mysql_upgrade.exe