2003-09-19 11:02:49 +02:00
|
|
|
--disable_warnings
|
2003-10-31 13:37:36 +01:00
|
|
|
DROP TABLE IF EXISTS t1, `"t"1`;
|
2003-09-19 11:02:49 +02:00
|
|
|
--enable_warnings
|
|
|
|
|
|
|
|
# XML output
|
|
|
|
|
|
|
|
CREATE TABLE t1(a int);
|
|
|
|
INSERT INTO t1 VALUES (1), (2);
|
2004-01-22 21:13:24 +01:00
|
|
|
--exec $MYSQL_DUMP --skip-all --skip-comments -X test t1
|
2003-09-24 13:13:47 +02:00
|
|
|
DROP TABLE t1;
|
2003-12-09 14:33:29 +01:00
|
|
|
|
|
|
|
#
|
|
|
|
# Bug #2005
|
|
|
|
#
|
|
|
|
|
2003-12-11 14:37:45 +01:00
|
|
|
CREATE TABLE t1 (a decimal(240, 20));
|
|
|
|
INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
|
|
|
|
("0987654321098765432109876543210987654321");
|
2004-01-22 21:13:24 +01:00
|
|
|
--exec $MYSQL_DUMP --skip-comments test t1
|
2003-12-11 14:37:45 +01:00
|
|
|
DROP TABLE t1;
|
2003-12-09 14:33:29 +01:00
|
|
|
|
|
|
|
#
|
|
|
|
# Bug #2055
|
|
|
|
#
|
|
|
|
|
2003-12-11 14:37:45 +01:00
|
|
|
CREATE TABLE t1 (a double);
|
|
|
|
INSERT INTO t1 VALUES (-9e999999);
|
2003-12-14 21:31:02 +01:00
|
|
|
# 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)
|
2003-12-11 14:37:45 +01:00
|
|
|
--exec $MYSQL_DUMP --skip-comments test t1
|
|
|
|
DROP TABLE t1;
|
2004-04-05 20:18:16 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# Bug #3361 mysqldum quotes DECIMAL values
|
|
|
|
#
|
|
|
|
|
|
|
|
CREATE TABLE t1 (a DECIMAL(10,5), b FLOAT);
|
|
|
|
|
|
|
|
# check at first how mysql work with quoted decimal
|
|
|
|
|
|
|
|
INSERT INTO t1 VALUES (1.2345, 2.3456);
|
|
|
|
INSERT INTO t1 VALUES ('1.2345', 2.3456);
|
|
|
|
INSERT INTO t1 VALUES ("1.2345", 2.3456);
|
|
|
|
|
2004-04-26 14:53:31 +02:00
|
|
|
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ANSI_QUOTES';
|
|
|
|
INSERT INTO t1 VALUES (1.2345, 2.3456);
|
|
|
|
INSERT INTO t1 VALUES ('1.2345', 2.3456);
|
|
|
|
--error 1054
|
|
|
|
INSERT INTO t1 VALUES ("1.2345", 2.3456);
|
|
|
|
SET SQL_MODE=@OLD_SQL_MODE;
|
2004-04-05 20:18:16 +02:00
|
|
|
|
|
|
|
# check how mysqldump make quoting
|
|
|
|
--exec $MYSQL_DUMP --skip-comments test t1
|
2003-09-19 11:02:49 +02:00
|
|
|
DROP TABLE t1;
|
2003-10-31 08:29:57 +01:00
|
|
|
|
2003-11-03 13:49:39 +01:00
|
|
|
CREATE TABLE t1(a int, b text, c varchar(3));
|
|
|
|
INSERT INTO t1 VALUES (1, "test", "tes"), (2, "TEST", "TES");
|
2004-01-22 21:13:24 +01:00
|
|
|
--exec $MYSQL_DUMP --skip-all --skip-comments -X test t1
|
2003-11-03 13:49:39 +01:00
|
|
|
DROP TABLE t1;
|
|
|
|
|
2003-10-31 08:29:57 +01:00
|
|
|
#
|
|
|
|
# Bug #1707
|
|
|
|
#
|
|
|
|
|
2003-11-05 09:06:03 +01:00
|
|
|
CREATE TABLE t1 (`a"b"` char(2));
|
|
|
|
INSERT INTO t1 VALUES ("1\""), ("\"2");
|
2004-01-22 21:13:24 +01:00
|
|
|
--exec $MYSQL_DUMP --skip-all --skip-comments -X test t1
|
2003-11-05 09:06:03 +01:00
|
|
|
DROP TABLE t1;
|
2003-12-09 12:28:58 +01:00
|
|
|
|
|
|
|
#
|
|
|
|
# Bug #1994
|
|
|
|
#
|
|
|
|
|
2003-12-10 12:27:33 +01:00
|
|
|
CREATE TABLE t1 (a VARCHAR(255)) DEFAULT CHARSET koi8r;
|
|
|
|
INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5');
|
2004-01-22 21:13:24 +01:00
|
|
|
--exec $MYSQL_DUMP --skip-comments test t1
|
2003-12-09 12:28:58 +01:00
|
|
|
DROP TABLE t1;
|
2004-02-05 03:30:28 +01:00
|
|
|
|
|
|
|
#
|
|
|
|
# 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;
|
2004-02-10 15:56:43 +01:00
|
|
|
|
|
|
|
#
|
|
|
|
# Bug #2592 'mysqldum doesn't quote "tricky" names correctly'
|
2004-02-06 23:22:12 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
create table ```a` (i int);
|
|
|
|
--exec $MYSQL_DUMP --skip-comments test
|
2004-02-10 15:44:27 +01:00
|
|
|
drop table ```a`;
|
2004-02-13 22:21:46 +01:00
|
|
|
|
2004-03-11 15:46:27 +01:00
|
|
|
#
|
|
|
|
# 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;
|
2004-03-11 19:01:25 +01:00
|
|
|
|
2004-02-13 22:21:46 +01:00
|
|
|
#
|
|
|
|
# Bug #2705 'mysqldump --tab extra output'
|
|
|
|
#
|
|
|
|
|
|
|
|
create table t1(a int);
|
|
|
|
insert into t1 values (1),(2),(3);
|
|
|
|
--exec $MYSQL_DUMP --skip-comments --tab=$MYSQL_TEST_DIR/var/tmp/ test
|
|
|
|
--exec cat $MYSQL_TEST_DIR/var/tmp/t1.sql
|
|
|
|
--exec cat $MYSQL_TEST_DIR/var/tmp/t1.txt
|
|
|
|
--exec rm $MYSQL_TEST_DIR/var/tmp/t1.sql
|
|
|
|
--exec rm $MYSQL_TEST_DIR/var/tmp/t1.txt
|
|
|
|
--exec $MYSQL_DUMP --tab=$MYSQL_TEST_DIR/var/tmp/ test
|
|
|
|
--exec rm $MYSQL_TEST_DIR/var/tmp/t1.sql
|
|
|
|
--exec rm $MYSQL_TEST_DIR/var/tmp/t1.txt
|
|
|
|
drop table t1;
|