mariadb/mysql-test/t/mysqldump.test
unknown cf58302d8b fixed bug #2591 "mysqldump quotas names inconsistently"
mysql-test/r/mysqldump.result:
  added test for bug #2591 "mysqldump quotas names inconsistently"
mysql-test/t/mysqldump.test:
  added test for bug #2591 "mysqldump quotas names inconsistently"
2004-03-11 18:46:27 +04:00

86 lines
2 KiB
Text

--disable_warnings
DROP TABLE IF EXISTS t1, `"t"1`;
--enable_warnings
# XML output
CREATE TABLE t1(a int);
INSERT INTO t1 VALUES (1), (2);
--exec $MYSQL_DUMP --skip-all --skip-comments -X test t1
DROP TABLE t1;
#
# Bug #2005
#
CREATE TABLE t1 (a decimal(240, 20));
INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
("0987654321098765432109876543210987654321");
--exec $MYSQL_DUMP --skip-comments test t1
DROP TABLE t1;
#
# Bug #2055
#
CREATE TABLE t1 (a double);
INSERT INTO t1 VALUES (-9e999999);
# The following replaces is here because some systems replaces the above
# double with '-inf' and others with MAX_DOUBLE
--replace_result (-1.79769313486232e+308) (RES) (NULL) (RES)
--exec $MYSQL_DUMP --skip-comments test t1
DROP TABLE t1;
CREATE TABLE t1(a int, b text, c varchar(3));
INSERT INTO t1 VALUES (1, "test", "tes"), (2, "TEST", "TES");
--exec $MYSQL_DUMP --skip-all --skip-comments -X test t1
DROP TABLE t1;
#
# Bug #1707
#
CREATE TABLE t1 (`a"b"` char(2));
INSERT INTO t1 VALUES ("1\""), ("\"2");
--exec $MYSQL_DUMP --skip-all --skip-comments -X test t1
DROP TABLE t1;
#
# Bug #1994
#
CREATE TABLE t1 (a VARCHAR(255)) DEFAULT CHARSET koi8r;
INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5');
--exec $MYSQL_DUMP --skip-comments test t1
DROP TABLE t1;
#
# Bug #2634
#
CREATE TABLE t1 (a int) ENGINE=MYISAM;
INSERT INTO t1 VALUES (1), (2);
--exec $MYSQL_DUMP --skip-comments --compatible=mysql40 test t1
--exec $MYSQL_DUMP --skip-comments --compatible=mysql323 test t1
DROP TABLE t1;
#
# Bug #2592 'mysqldum doesn't quote "tricky" names correctly'
#
create table ```a` (i int);
--exec $MYSQL_DUMP --skip-comments test
drop table ```a`;
#
# Bug #2591 "mysqldump quotes names inconsistently"
#
create table t1(a int);
--exec $MYSQL_DUMP --comments=0 test
--exec $MYSQL_DUMP --comments=0 --compatible=ansi test
set global sql_mode='ANSI_QUOTES';
--exec $MYSQL_DUMP --comments=0 test
--exec $MYSQL_DUMP --comments=0 --compatible=ansi test
set global sql_mode='';
drop table t1;