List:Commits« Previous MessageNext Message »
From:msvensson Date:May 19 2007 6:15pm
Subject:bk commit into 5.0 tree (msvensson:1.2486) BUG#28401
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-05-19 18:15:08+02:00, msvensson@stripped +3 -0
  Bug #28401 mysql_upgrade Failed with STRICT_ALL_TABLES, ANSI_QUOTES and NO_ZERO_DATE
   - The SQL commands used by mysql_upgrade are written to be run
      with sql_mode set to '' - thus the scripts should change sql_mode
      for the session to make sure the SQL is legal.

  mysql-test/r/mysql_upgrade.result@stripped, 2007-05-19 18:15:07+02:00,
msvensson@stripped +19 -0
    Update test result

  mysql-test/t/mysql_upgrade.test@stripped, 2007-05-19 18:15:07+02:00, msvensson@stripped
+13 -0
    The SQL commands used by mysql_upgrade are written to be run
    with sql_mode set to '' - thus the scripts should change sql_mode
    for the session to make sure the SQL is legal.

  scripts/mysql_system_tables_fix.sql@stripped, 2007-05-19 18:15:07+02:00,
msvensson@stripped +1 -0
    Set sql_mode to '' before running the SQL commands
    to fix system tables - backport from 5.1

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	msvensson
# Host:	pilot.blaudden
# Root:	/home/msvensson/mysql/bug28401/my50-bug28401

--- 1.44/scripts/mysql_system_tables_fix.sql	2007-02-28 11:37:38 +01:00
+++ 1.45/scripts/mysql_system_tables_fix.sql	2007-05-19 18:15:07 +02:00
@@ -9,6 +9,7 @@
 # this sql script.
 # On windows you should do 'mysql --force mysql < mysql_fix_privilege_tables.sql'
 
+set sql_mode='';
 set storage_engine=MyISAM;
 
 ALTER TABLE user add File_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL;

--- 1.5/mysql-test/r/mysql_upgrade.result	2007-04-19 21:35:09 +02:00
+++ 1.6/mysql-test/r/mysql_upgrade.result	2007-05-19 18:15:07 +02:00
@@ -60,3 +60,22 @@ DROP USER mysqltest1@'%';
 Run mysql_upgrade with a non existing server socket
 mysqlcheck: Got error: 2005: Unknown MySQL server host 'not_existing_host' (errno) when
trying to connect
 FATAL ERROR: Upgrade failed
+set GLOBAL sql_mode='STRICT_ALL_TABLES,ANSI_QUOTES,NO_ZERO_DATE';
+mysql.columns_priv                                 OK
+mysql.db                                           OK
+mysql.func                                         OK
+mysql.help_category                                OK
+mysql.help_keyword                                 OK
+mysql.help_relation                                OK
+mysql.help_topic                                   OK
+mysql.host                                         OK
+mysql.proc                                         OK
+mysql.procs_priv                                   OK
+mysql.tables_priv                                  OK
+mysql.time_zone                                    OK
+mysql.time_zone_leap_second                        OK
+mysql.time_zone_name                               OK
+mysql.time_zone_transition                         OK
+mysql.time_zone_transition_type                    OK
+mysql.user                                         OK
+set GLOBAL sql_mode=default;

--- 1.7/mysql-test/t/mysql_upgrade.test	2007-04-23 21:27:33 +02:00
+++ 1.8/mysql-test/t/mysql_upgrade.test	2007-05-19 18:15:07 +02:00
@@ -55,3 +55,16 @@ DROP USER mysqltest1@'%';
 --replace_regex /.*mysqlcheck.*: Got/mysqlcheck: Got/ /\([0-9]*\)/(errno)/
 --error 1
 --exec $MYSQL_UPGRADE --skip-verbose --force --host=not_existing_host 2>&1
+
+#
+# Bug #28401 mysql_upgrade Failed with STRICT_ALL_TABLES, ANSI_QUOTES and NO_ZERO_DATE
+#
+
+# The SQL commands used by mysql_upgrade are written to be run
+# with sql_mode set to '' - thus the scripts should change sql_mode
+# for the session to make sure the SQL is legal.
+
+# Test by setting sql_mode before running mysql_upgrade
+set GLOBAL sql_mode='STRICT_ALL_TABLES,ANSI_QUOTES,NO_ZERO_DATE';
+--exec $MYSQL_UPGRADE --skip-verbose --force 2>&1
+eval set GLOBAL sql_mode=default;
Thread
bk commit into 5.0 tree (msvensson:1.2486) BUG#28401msvensson19 May