Home > front end >  Modifying the "settings" of the MySQL stored procedures
Modifying the "settings" of the MySQL stored procedures

Time:12-14

According to the MySQL documentation, stored procedures are executed with the sql_mode in which they were created.

I need to change the sql_mode parameter for a specific stored procedure

SHOW CREATE PROCEDURE command - shows the current sql_mode STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

How can it be changed, specifically - remove strict mode

Thanks

CodePudding user response:

  1. Export the procedure's definition with SHOW CREATE PROCEDURE.
  2. Then DROP PROCEDURE.
  3. Then create a new MySQL session and ensure sql_mode is set correctly.
  4. Then CREATE PROCEDURE with the .sql file you saved in step 1.
  • Related