mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
b99bea6704
configure.in: Auto merged client/mysqldump.c: Auto merged innobase/buf/buf0rea.c: Auto merged innobase/dict/dict0load.c: Auto merged innobase/fil/fil0fil.c: Auto merged innobase/include/fil0fil.h: Auto merged innobase/include/row0mysql.h: Auto merged innobase/include/trx0trx.h: Auto merged innobase/os/os0file.c: Auto merged innobase/row/row0ins.c: Auto merged innobase/row/row0mysql.c: Auto merged innobase/row/row0sel.c: Auto merged innobase/srv/srv0start.c: Auto merged innobase/trx/trx0trx.c: Auto merged libmysqld/lib_sql.cc: Auto merged mysql-test/mysql-test-run.sh: Auto merged mysql-test/r/alter_table.result: Auto merged mysql-test/r/ctype_ucs.result: Auto merged mysql-test/r/func_str.result: Auto merged mysql-test/r/grant.result: Auto merged mysql-test/r/grant_cache.result: Auto merged mysql-test/r/merge.result: Auto merged mysql-test/r/ndb_blob.result: Auto merged mysql-test/r/ps_1general.result: Auto merged mysql-test/r/subselect.result: Auto merged mysql-test/r/timezone2.result: Auto merged mysql-test/t/ctype_ucs.test: Auto merged mysql-test/t/grant.test: Auto merged mysql-test/t/merge.test: Auto merged mysql-test/t/multi_update.test: Auto merged mysql-test/t/mysqldump.test: Auto merged mysql-test/t/subselect.test: Auto merged ndb/src/ndbapi/NdbBlob.cpp: Auto merged ndb/src/ndbapi/NdbConnection.cpp: Auto merged ndb/src/ndbapi/NdbDictionaryImpl.cpp: Auto merged ndb/src/ndbapi/NdbOperationDefine.cpp: Auto merged sql/ha_innodb.cc: Auto merged sql/ha_myisammrg.cc: Auto merged sql/ha_myisammrg.h: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_func.cc: Auto merged sql/item_strfunc.cc: Auto merged sql/log.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/set_var.cc: Auto merged sql-common/client.c: Auto merged sql/sql_table.cc: Auto merged sql/strfunc.cc: Auto merged sql/unireg.cc: Auto merged vio/vio.c: Auto merged vio/viosocket.c: Auto merged
176 lines
4.8 KiB
Text
176 lines
4.8 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-create --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 --compact 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 --compact test t1
|
||
DROP TABLE t1;
|
||
|
||
#
|
||
# Bug #3361 mysqldump quotes DECIMAL values inconsistently
|
||
#
|
||
|
||
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);
|
||
|
||
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;
|
||
|
||
# check how mysqldump make quoting
|
||
--exec $MYSQL_DUMP --compact test t1
|
||
--exec $MYSQL_DUMP --compact --skip-create test t1
|
||
--exec $MYSQL_DUMP --skip-create --skip-comments test t1
|
||
--exec $MYSQL_DUMP --skip-opt --extended-insert --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-create --compact -X test t1
|
||
DROP TABLE t1;
|
||
|
||
#
|
||
# Bug #1707
|
||
#
|
||
|
||
CREATE TABLE t1 (`a"b"` char(2));
|
||
INSERT INTO t1 VALUES ("1\""), ("\"2");
|
||
--exec $MYSQL_DUMP --compact --skip-create -X test t1
|
||
DROP TABLE t1;
|
||
|
||
#
|
||
# Bug #1994
|
||
# Bug #4261
|
||
#
|
||
|
||
CREATE TABLE t1 (a VARCHAR(255)) DEFAULT CHARSET koi8r;
|
||
INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5'), (NULL);
|
||
--exec $MYSQL_DUMP --skip-comments --skip-extended-insert 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 'mysqldump doesn't quote "tricky" names correctly'
|
||
#
|
||
|
||
create table ```a` (i int);
|
||
--exec $MYSQL_DUMP --compact 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;
|
||
|
||
#
|
||
# 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;
|
||
|
||
#
|
||
# dump of view
|
||
#
|
||
create table t1(a int);
|
||
create view v1 as select * from t1;
|
||
--exec $MYSQL_DUMP --skip-comments test
|
||
drop view v1;
|
||
drop table t1;
|
||
|
||
#
|
||
# Bug #6101: create database problem
|
||
#
|
||
|
||
--exec $MYSQL_DUMP --skip-comments --databases test
|
||
|
||
create database mysqldump_test_db character set latin2 collate latin2_bin;
|
||
--exec $MYSQL_DUMP --skip-comments --databases mysqldump_test_db;
|
||
drop database mysqldump_test_db;
|
||
|
||
#
|
||
# Bug #7020
|
||
# Check that we don't dump in UTF8 in compatible mode by default,
|
||
# but use the default compiled values, or the values given in
|
||
# --default-character-set=xxx. However, we should dump in UTF8
|
||
# if it is explicitely set.
|
||
|
||
CREATE TABLE t1 (a CHAR(10));
|
||
INSERT INTO t1 VALUES (_latin1 '<27><><EFBFBD><EFBFBD>');
|
||
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments test t1
|
||
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --compatible=mysql323 test t1
|
||
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --compatible=mysql323 --default-character-set=cp850 test t1
|
||
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=cp850 --compatible=mysql323 test t1
|
||
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=utf8 --compatible=mysql323 test t1
|
||
DROP TABLE t1;
|
||
|
||
#
|
||
# WL #2319: Exclude Tables from dump
|
||
#
|
||
|
||
CREATE TABLE t1 (a int);
|
||
CREATE TABLE t2 (a int);
|
||
INSERT INTO t1 VALUES (1),(2),(3);
|
||
INSERT INTO t2 VALUES (4),(5),(6);
|
||
--exec $MYSQL_DUMP --skip-comments --ignore-table=test.t1 test
|
||
DROP TABLE t1;
|
||
DROP TABLE t2;
|