4071 Vamsikrishna Bhagi 2012-11-20
Bug#14463669 FAILURE TO CORRECTLY PARSE ROUTINES IN
MYSQLDUMP OUTPUT
A patch is pushed on this bug. A result mismatch
occured for the test main.ddl_i18n_koi8r in
x86_64 gcov build of linux in pb2. This commit is
to modify ddl_i18n_koi8r.result to match the
changes made for the bug.
modified:
mysql-test/r/ddl_i18n_koi8r.result
4070 Vamsikrishna Bhagi 2012-11-19
Bug#14463669 FAILURE TO CORRECTLY PARSE ROUTINES IN
MYSQLDUMP OUTPUT
Problem: mysqldump when used with option --routines, dumps
all the routines of the specified database into
output. The statements in this output are written
in such a way that they are version safe using C
style version commenting (of the format
/*!<version num> <sql statement>*/). If a semicolon
is present right before closing of the comment in
dump output, it results in a syntax error while
importing.
Solution: Version comments for dumped routines are
specifically to protect the ones older than 5.0.
When the import is done on 5.0 or later versions,
entire create statement gets executed as all the
check conditions at the beginning of the comments
are cleared. Since the trade off is between the
performance of newer versions which are more in
use and protection of very old versions which are
no longer supported, it is proposed that these
comments be removed altogether to maintain
stability of the versions supported.
@ client/mysqldump.c
Bug#14463669 FAILURE TO CORRECTLY PARSE ROUTINES IN
MYSQLDUMP OUTPUT
Output of mysqldump is derived by getting the queries from
show create and appending version comments to them.
query_str is the variable used to store the final string.
Since it is no longer required, its declaration and
manipulations made on it are deleted. At the step where
output is printed, query_str is replaced with the original
query string derived from 'show create'.
modified:
client/mysqldump.c
mysql-test/r/mysqldump.result
=== modified file 'mysql-test/r/ddl_i18n_koi8r.result'
--- a/mysql-test/r/ddl_i18n_koi8r.result 2011-02-22 14:02:49 +0000
+++ b/mysql-test/r/ddl_i18n_koi8r.result 2012-11-20 06:00:39 +0000
@@ -734,7 +734,7 @@ ALTER DATABASE `mysqltest1` CHARACTER SE
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = '' */ ;
DELIMITER ;;
-/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `p1`(
+CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`(
INOUT �����1 CHAR(10),
OUT �����2 CHAR(10))
BEGIN
@@ -751,7 +751,7 @@ COLLATION(_utf8 'текст') AS c6,
@@character_set_client AS c8;
SET �����1 = 'a';
SET �����2 = 'b';
-END */;;
+END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
@@ -768,7 +768,7 @@ ALTER DATABASE `mysqltest1` CHARACTER SE
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = '' */ ;
DELIMITER ;;
-/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `p2`(
+CREATE DEFINER=`root`@`localhost` PROCEDURE `p2`(
INOUT �����1 CHAR(10) CHARACTER SET utf8,
OUT �����2 CHAR(10) CHARACTER SET utf8)
BEGIN
@@ -785,7 +785,7 @@ COLLATION(_utf8 'текст') AS c6,
@@character_set_client AS c8;
SET �����1 = 'a';
SET �����2 = 'b';
-END */;;
+END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
@@ -810,7 +810,7 @@ ALTER DATABASE `mysqltest2` CHARACTER SE
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = '' */ ;
DELIMITER ;;
-/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `p3`(
+CREATE DEFINER=`root`@`localhost` PROCEDURE `p3`(
INOUT �����1 CHAR(10),
OUT ���f8 'текст') AS c6,
@@character_set_client AS c8;
SET �����1 = 'a';
SET �����2 = 'b';
-END */;;
+END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
@@ -844,7 +844,7 @@ ALTER DATABASE `mysqltest2` CHARACTER SE
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = '' */ ;
DELIMITER ;;
-/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `p4`(
+CREATE DEFINER=`root`@`localhost` PROCEDURE `p4`(
INOUT �����1 CHAR(10) CHARACTER SET utf8,
OUT �����2 CHAR(10) CHARACTER SET utf8)
BEGIN
@@ -861,7 +861,7 @@ COLLATION(_utf8 'текст') AS c6,
@@character_set_client AS c8;
SET �����1 = 'a';
SET �����2 = 'b';
-END */;;
+END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
No bundle (reason: useless for push emails).| Thread |
|---|
| • bzr push into mysql-5.5 branch (vamsikrishna.bhagi:4070 to 4071) Bug#14463669 | Vamsikrishna Bhagi | 20 Nov |