mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
Move test for bug 39559, which uses command-line mysql client
to separate test file that doesn't permit mysqld embedded in mysqltest. Also, fix different comment handling in a incorrect new-to-5.1 test.
This commit is contained in:
parent
09d4c1da0f
commit
a3bddbe465
6 changed files with 85 additions and 75 deletions
|
@ -616,54 +616,5 @@ SELECT a1, a4 FROM t2 WHERE a4 LIKE {fn UCASE('1789-07-14')};
|
|||
a1 a4
|
||||
DROP TABLE t1, t2, t3;
|
||||
#
|
||||
# Bug#39559: dump of stored procedures / functions with C-style
|
||||
# comment can't be read back
|
||||
#
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 2 | 2 |
|
||||
+----------+--------+
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 1 | 1 |
|
||||
+----------+--------+
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 3 | 3 |
|
||||
+----------+--------+
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 2 | 2 |
|
||||
+----------+--------+
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 7 | 7 |
|
||||
+----------+--------+
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 8 | 8 |
|
||||
+----------+--------+
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 7 | 7 |
|
||||
+----------+--------+
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 4 | 4 |
|
||||
+----------+--------+
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 4 | 4 |
|
||||
+----------+--------+
|
||||
#
|
||||
# End of 5.1 tests
|
||||
#
|
||||
|
|
49
mysql-test/r/parser_not_embedded.result
Normal file
49
mysql-test/r/parser_not_embedded.result
Normal file
|
@ -0,0 +1,49 @@
|
|||
#
|
||||
# Bug#39559: dump of stored procedures / functions with C-style
|
||||
# comment can't be read back
|
||||
#
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 2 | 2 |
|
||||
+----------+--------+
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 1 | 1 |
|
||||
+----------+--------+
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 3 | 3 |
|
||||
+----------+--------+
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 2 | 2 |
|
||||
+----------+--------+
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 7 | 7 |
|
||||
+----------+--------+
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 8 | 8 |
|
||||
+----------+--------+
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 7 | 7 |
|
||||
+----------+--------+
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 4 | 4 |
|
||||
+----------+--------+
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 4 | 4 |
|
||||
+----------+--------+
|
|
@ -53,7 +53,14 @@ CREATE TABLE t1 (a INT)
|
|||
of multi-line
|
||||
comment */
|
||||
PARTITIONS 5 */;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*/' at line 6
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY HASH (a)
|
||||
PARTITIONS 5 */
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a INT)
|
||||
/*!50100 PARTITION BY HASH (a)
|
||||
-- with a single line comment embedded
|
||||
|
|
|
@ -725,30 +725,6 @@ UPDATE t3 SET a4={d '1789-07-14'} WHERE a1=0;
|
|||
SELECT a1, a4 FROM t2 WHERE a4 LIKE {fn UCASE('1789-07-14')};
|
||||
DROP TABLE t1, t2, t3;
|
||||
|
||||
###########################################################################
|
||||
--echo #
|
||||
--echo # Bug#39559: dump of stored procedures / functions with C-style
|
||||
--echo # comment can't be read back
|
||||
--echo #
|
||||
|
||||
--write_file $MYSQLTEST_VARDIR/tmp/bug39559.sql
|
||||
select 2 as expected, /*!01000/**/*/ 2 as result;
|
||||
select 1 as expected, /*!99998/**/*/ 1 as result;
|
||||
select 3 as expected, /*!01000 1 + */ 2 as result;
|
||||
select 2 as expected, /*!99990 1 + */ 2 as result;
|
||||
select 7 as expected, /*!01000 1 + /* 8 + */ 2 + */ 4 as result;
|
||||
select 8 as expected, /*!99998 1 + /* 2 + */ 4 + */ 8 as result;
|
||||
select 7 as expected, /*!01000 1 + /*!01000 8 + */ 2 + */ 4 as result;
|
||||
select 7 as expected, /*!01000 1 + /*!99998 8 + */ 2 + */ 4 as result;
|
||||
select 4 as expected, /*!99998 1 + /*!99998 8 + */ 2 + */ 4 as result;
|
||||
select 4 as expected, /*!99998 1 + /*!01000 8 + */ 2 + */ 4 as result;
|
||||
select 7 as expected, /*!01000 1 + /*!01000 8 + /*!01000 error */ 16 + */ 2 + */ 4 as result;
|
||||
select 4 as expected, /* 1 + /*!01000 8 + */ 2 + */ 4;
|
||||
EOF
|
||||
|
||||
--exec $MYSQL --comment --force --table test <$MYSQLTEST_VARDIR/tmp/bug39559.sql
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/bug39559.sql
|
||||
|
||||
--echo #
|
||||
--echo # End of 5.1 tests
|
||||
--echo #
|
||||
|
|
26
mysql-test/t/parser_not_embedded.test
Normal file
26
mysql-test/t/parser_not_embedded.test
Normal file
|
@ -0,0 +1,26 @@
|
|||
--source include/not_embedded.inc
|
||||
|
||||
###########################################################################
|
||||
--echo #
|
||||
--echo # Bug#39559: dump of stored procedures / functions with C-style
|
||||
--echo # comment can't be read back
|
||||
--echo #
|
||||
|
||||
--write_file $MYSQLTEST_VARDIR/tmp/bug39559.sql
|
||||
select 2 as expected, /*!01000/**/*/ 2 as result;
|
||||
select 1 as expected, /*!99998/**/*/ 1 as result;
|
||||
select 3 as expected, /*!01000 1 + */ 2 as result;
|
||||
select 2 as expected, /*!99990 1 + */ 2 as result;
|
||||
select 7 as expected, /*!01000 1 + /* 8 + */ 2 + */ 4 as result;
|
||||
select 8 as expected, /*!99998 1 + /* 2 + */ 4 + */ 8 as result;
|
||||
select 7 as expected, /*!01000 1 + /*!01000 8 + */ 2 + */ 4 as result;
|
||||
select 7 as expected, /*!01000 1 + /*!99998 8 + */ 2 + */ 4 as result;
|
||||
select 4 as expected, /*!99998 1 + /*!99998 8 + */ 2 + */ 4 as result;
|
||||
select 4 as expected, /*!99998 1 + /*!01000 8 + */ 2 + */ 4 as result;
|
||||
select 7 as expected, /*!01000 1 + /*!01000 8 + /*!01000 error */ 16 + */ 2 + */ 4 as result;
|
||||
select 4 as expected, /* 1 + /*!01000 8 + */ 2 + */ 4;
|
||||
EOF
|
||||
|
||||
--exec $MYSQL --comment --force --table test <$MYSQLTEST_VARDIR/tmp/bug39559.sql
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/bug39559.sql
|
||||
|
|
@ -67,13 +67,14 @@ drop table t1;
|
|||
#
|
||||
# Verification tests for bug#14326
|
||||
#
|
||||
--error ER_PARSE_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
/*!50100 PARTITION BY HASH (a)
|
||||
/* Test
|
||||
of multi-line
|
||||
comment */
|
||||
PARTITIONS 5 */;
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a INT)
|
||||
/*!50100 PARTITION BY HASH (a)
|
||||
-- with a single line comment embedded
|
||||
|
|
Loading…
Reference in a new issue