You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
... has failed while attempting to execute script file filename.sql due to error "(0x80004005) Error 0: Fatal error encountered during command execution."
SQL script:
drop procedure if exists test;
CREATE PROCEDURE test()
BEGIN
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
SET @error = 'In SQLEXCEPTION handler';
END;
END
I turned on general_log in MariaDB and examining the log could see that this script wasn't sent to the server indicating that the failure occured in yuniql.
The text was updated successfully, but these errors were encountered:
MariaDB should work the same as MySQL - Yuniql does not support the delimiter value that you set in MySQL Workbench. We found placing the entire procedure or trigger block on one line, yunql worked. You have an extra begin end block that we don't have.
CREATE PROCEDURE test() BEGIN DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN SET @error = 'In SQLEXCEPTION handler'; END; END;
This is not setting a delimiter, DECLARE EXIT HANDLER FOR SQLEXCEPTION is a compound statement supported by MySql with its own BEGIN END and it can be nested inside a stored procedure. Here is a MySql doc reference: https://dev.mysql.com/doc/refman/8.0/en/declare-handler.html
The error message:
SQL script:
I turned on general_log in MariaDB and examining the log could see that this script wasn't sent to the server indicating that the failure occured in yuniql.
The text was updated successfully, but these errors were encountered: