当我从 mysql 控制台或 MySQL Workbench 更改 Delimeter 时,我没有收到任何错误,但是当我在 ruby on rails 中嵌入相同的代码时,我收到错误
mysql> DELIMITER $$
mysql>
没有错误。
但
ActiveRecord::Base.connection.execute(%Q{
DELIMITER $$
})
给出:
ActiveRecord::StatementInvalid: Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER $$' at line 1: