Bug #32633 | Can not create any routine if SQL_MODE=no_engine_substitution | ||
---|---|---|---|
Submitted: | 22 Nov 2007 19:43 | Modified: | 11 Feb 2008 20:32 |
Reporter: | Konstantin Osipov (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: DDL | Severity: | S3 (Non-critical) |
Version: | 5.1.x; 6.0.4 | OS: | Any |
Assigned to: | Davi Arnaut | CPU Architecture: | Any |
Tags: | regression |
[22 Nov 2007 19:43]
Konstantin Osipov
[22 Nov 2007 19:48]
Valeriy Kravchuk
Looks like this is a bug in versions 5.1.x. I can not repeat it (with procedure) on 5.0.44, for example. It is easily repeatable on 5.1.21 and other 5.1.x versions, though.
[22 Nov 2007 20:20]
Konstantin Osipov
Valeriy, the bug is repeatable in 5.0, but there the sql_mode value is silently lost, even though the routine is created. You can verify it by selecting from mysql.proc or information_schema. So on 5.0 it's a dump/restore problem.
[7 Feb 2008 10:47]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/41858 ChangeSet@1.2521, 2008-02-07 08:47:39-02:00, davi@mysql.com +13 -0 Bug#32633 Can not create any routine if SQL_MODE=no_engine_substitution The problem is that one can not create a stored routine if sql_mode contains NO_ENGINE_SUBSTITUTION or PAD_CHAR_TO_FULL_LENGTH. Also when a event is created, the mode is silently lost if sql_mode contains one of the aforementioned. This was happening because the table definitions which stored sql_mode values weren't being updated to accept new values of sql_mode. The solution is to update, in a backwards compatible manner, the various table definitions (columns) that store the sql_mode value to take into account the new possible values. One incompatible change is that if a event that is being created can't be stored to the mysql.event table, an error will be raised. The tests case also ensure that new SQL modes will be added to the mysql.proc and mysql.event tables, otherwise the tests will fail.
[7 Feb 2008 18:16]
Davi Arnaut
Pushed in 5.1-runtime
[11 Feb 2008 16:24]
Bugs System
Pushed into 5.1.24-rc
[11 Feb 2008 16:26]
Bugs System
Pushed into 6.0.5-alpha
[11 Feb 2008 20:32]
Paul DuBois
Noted in 5.1.24, 6.0.5 changelogs. Tables in the mysql database that stored the current sql_mode value as part of stored program definitions were not updated with newer mode values (NO_ENGINE_SUBSTITUTION, PAD_CHAR_TO_FULL_LENGTH). This causes various problems defining stored programs if those modes were included in the current sql_mode value.
[15 Feb 2008 23:31]
Davi Arnaut
Bug#34613 was marked as a duplicate of this one.
[25 Feb 2008 10:05]
Davi Arnaut
Bug#34794 was marked as duplicate of this one.
[5 Mar 2008 5:40]
Valeriy Kravchuk
Bug #35064 was marked as a duplicate of this one.
[6 Mar 2008 13:42]
Jon Stephens
Also documented for 5.1.23-ndb-6.2.14.
[31 Mar 2008 19:03]
Jon Stephens
Also documented for 5.1.23-ndb-6.3.11.
[1 Apr 2008 23:46]
Jared S
I tried changing SQL_MODE but CREATE PROCEDURE was still throwing error 4\1607 SET GLOBAL sql_mode = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER'
[4 Apr 2008 14:24]
Philip Stoev
Bug #35824 appears to be a result of that fix.
[6 Apr 2008 18:22]
Davi Arnaut
Bug#35857 has been marked as a duplicate of this bug.
[10 Apr 2008 2:04]
Jared S
when will 5.1.24-rc be release?
[18 Apr 2008 20:32]
Jared S
Thanks, just dowloaded 5.1.24 with the fix.