summaryrefslogtreecommitdiff
path: root/scripts/mysql_system_tables_fix.sql
diff options
context:
space:
mode:
authorunknown <davi@mysql.com/endora.local>2008-04-04 13:46:05 -0300
committerunknown <davi@mysql.com/endora.local>2008-04-04 13:46:05 -0300
commitccd31e9dd4ef9ac3266690231626237d13d53e17 (patch)
treef806716af343c1097f814df81866976457bc4f56 /scripts/mysql_system_tables_fix.sql
parente12312d82122cdd3743d05a12015385dd79348b6 (diff)
downloadmariadb-git-ccd31e9dd4ef9ac3266690231626237d13d53e17.tar.gz
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.
Diffstat (limited to 'scripts/mysql_system_tables_fix.sql')
-rw-r--r--scripts/mysql_system_tables_fix.sql5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql
index e2bdd668c0f..a33c4fcb9fa 100644
--- a/scripts/mysql_system_tables_fix.sql
+++ b/scripts/mysql_system_tables_fix.sql
@@ -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',