summaryrefslogtreecommitdiff
path: root/mysql-test/t/mysql_upgrade.test
diff options
context:
space:
mode:
authorlars-erik.bjork@sun.com <>2009-12-03 17:15:47 +0100
committerlars-erik.bjork@sun.com <>2009-12-03 17:15:47 +0100
commit99654c27f07a22fcd291d46e97cb01b68e1249fb (patch)
tree020afd2aa4ce4cb6d297f9f349921cec88e78f42 /mysql-test/t/mysql_upgrade.test
parentc286b4115d63f4198448ff313da5db3c9bc1f6f4 (diff)
downloadmariadb-git-99654c27f07a22fcd291d46e97cb01b68e1249fb.tar.gz
This is a patch for bug#41569.
"mysql_upgrade (ver 5.1) add 3 fields to mysql.proc table but does not set values". mysql_upgrade (ver 5.1) adds 3 fields (character_set_client, collation_connection and db_collation) to the mysql.proc table, but does not set any values. When we run stored procedures, which were created with mysql 5.0, a warning is logged into the error log. The solution to this is for mysql_upgrade to set default best guess values for these fields. A warning is also written during upgrade, to make the user aware that default values are set.
Diffstat (limited to 'mysql-test/t/mysql_upgrade.test')
-rw-r--r--mysql-test/t/mysql_upgrade.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/t/mysql_upgrade.test b/mysql-test/t/mysql_upgrade.test
index d1f97d7287e..937c9d7a212 100644
--- a/mysql-test/t/mysql_upgrade.test
+++ b/mysql-test/t/mysql_upgrade.test
@@ -89,3 +89,20 @@ DROP USER mysqltest1@'%';
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;
+
+
+--echo #
+--echo # Bug #41569 mysql_upgrade (ver 5.1) add 3 fields to mysql.proc table
+--echo # but does not set values.
+--echo #
+
+# Create a stored procedure and set the fields in question to null.
+# When running mysql_upgrade, a warning should be written.
+
+CREATE PROCEDURE testproc() BEGIN END;
+UPDATE mysql.proc SET character_set_client = NULL WHERE name LIKE 'testproc';
+UPDATE mysql.proc SET collation_connection = NULL WHERE name LIKE 'testproc';
+UPDATE mysql.proc SET db_collation = NULL WHERE name LIKE 'testproc';
+--exec $MYSQL_UPGRADE --skip-verbose --force 2>&1
+CALL testproc();
+DROP PROCEDURE testproc;