diff options
author | Alexander Barkov <bar@mnogosearch.org> | 2013-10-29 10:09:11 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mnogosearch.org> | 2013-10-29 10:09:11 +0400 |
commit | 727c1f62a59131b1f33f9931cb6dcba031e35847 (patch) | |
tree | 8864221e2a620241bfa47da9cdadae6936396749 /storage/connect | |
parent | 89e71ffb40e5f58b7ec29c3b74db6a8a9bcc9a20 (diff) | |
download | mariadb-git-727c1f62a59131b1f33f9931cb6dcba031e35847.tar.gz |
MDEV-4877 mysqldump dumps all data from a connect table
Diffstat (limited to 'storage/connect')
-rw-r--r-- | storage/connect/mysql-test/connect/r/mysql.result | 21 | ||||
-rw-r--r-- | storage/connect/mysql-test/connect/t/mysql.test | 14 |
2 files changed, 35 insertions, 0 deletions
diff --git a/storage/connect/mysql-test/connect/r/mysql.result b/storage/connect/mysql-test/connect/r/mysql.result index 784162cae33..c0ef487c111 100644 --- a/storage/connect/mysql-test/connect/r/mysql.result +++ b/storage/connect/mysql-test/connect/r/mysql.result @@ -217,3 +217,24 @@ t2 CREATE TABLE `t2` ( SELECT * FROM t2; a DROP TABLE t2, t1; +# +# MDEV-4877 mysqldump dumps all data from a connect table +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (10),(20),(30); +CREATE TABLE t2 ENGINE=CONNECT TABLE_TYPE=MYSQL CONNECTION='mysql://root@localhost:PORT/test/t1'; +SELECT * FROM t2; +a +10 +20 +30 +# Start of mysqldump ------ +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL +) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='mysql://root@localhost:PORT/test/t1' `TABLE_TYPE`='MYSQL'; +/*!40101 SET character_set_client = @saved_cs_client */; +# End of mysqldump ------ +DROP TABLE t2; +DROP TABLE t1; diff --git a/storage/connect/mysql-test/connect/t/mysql.test b/storage/connect/mysql-test/connect/t/mysql.test index 271e3f07465..673df3fcb54 100644 --- a/storage/connect/mysql-test/connect/t/mysql.test +++ b/storage/connect/mysql-test/connect/t/mysql.test @@ -420,3 +420,17 @@ DROP TABLE t2, t1; # TODO: add test for YEAR
# TODO: add tests for fractional seconds
+--echo #
+--echo # MDEV-4877 mysqldump dumps all data from a connect table
+--echo #
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (10),(20),(30);
+--replace_result $PORT PORT
+--eval CREATE TABLE t2 ENGINE=CONNECT TABLE_TYPE=MYSQL CONNECTION='mysql://root@localhost:$PORT/test/t1'
+SELECT * FROM t2;
+--echo # Start of mysqldump ------
+--replace_result $PORT PORT
+--exec $MYSQL_DUMP --compact test t2
+--echo # End of mysqldump ------
+DROP TABLE t2;
+DROP TABLE t1;
|