Commit ccd31e9d authored by unknown's avatar unknown

Bug#35824: mysql_upgrade does not fix scheduler tables when upgrading from 5.1.23 to 5.1.24

The problem is that when upgrading the event table, the sql_mode
column was always being added instead of being updated to list new
sql_mode values, causing upgrades of the event which already have
a sql_mode column to not be updated to the new sql_mode values.

The solution is to always add first a stub sql_mode column and
subsequently update the column to the new sql_mode values.


scripts/mysql_system_tables_fix.sql:
  Always add and update the sql_mode column of the event table.
parent e12312d8
......@@ -433,7 +433,10 @@ ALTER TABLE db MODIFY Event_priv enum('N','Y') character set utf8 DEFAULT 'N' NO
#
ALTER TABLE event DROP PRIMARY KEY;
ALTER TABLE event ADD PRIMARY KEY(db, name);
ALTER TABLE event ADD sql_mode
# Add sql_mode column just in case.
ALTER TABLE event ADD sql_mode set ('NOT_USED') AFTER on_completion;
# Update list of sql_mode values.
ALTER TABLE event MODIFY sql_mode
set('REAL_AS_FLOAT',
'PIPES_AS_CONCAT',
'ANSI_QUOTES',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment