Below is the list of changes that have just been committed into a local
4.1 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2292 05/06/20 15:09:52 msvensson@neptunus.(none) +2 -0
Manual merge
mysql-test/t/mysqldump.test
1.35 05/06/20 15:09:50 msvensson@neptunus.(none) +1 -1
Merge
mysql-test/r/mysqldump.result
1.47 05/06/20 15:09:50 msvensson@neptunus.(none) +3 -3
Merge
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: neptunus.(none)
# Root: /home/msvensson/mysql/bug9358/RESYNC
--- 1.46/mysql-test/r/mysqldump.result 2005-06-10 16:26:20 +02:00
+++ 1.47/mysql-test/r/mysqldump.result 2005-06-20 15:09:50 +02:00
@@ -399,7 +399,7 @@
drop database mysqldump_test_db;
CREATE TABLE t1 (a CHAR(10));
+INSERT INTO t1 VALUES (_latin1 'ÄÖÜß');
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -441,7 +441,7 @@
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
LOCK TABLES `t1` WRITE;
+INSERT INTO `t1` VALUES ('á');
UNLOCK TABLES;
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
@@ -462,7 +462,7 @@
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
LOCK TABLES `t1` WRITE;
+INSERT INTO `t1` VALUES ('á');
UNLOCK TABLES;
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
@@ -1349,6 +1349,33 @@
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
DROP TABLE t1;
+create database mysqldump_test_db;
+use mysqldump_test_db;
+create table t1(a varchar(30) primary key, b int not null);
+create table t2(a varchar(30) primary key, b int not null);
+create table t3(a varchar(30) primary key, b int not null);
+test_sequence
+------ Testing with illegal table names ------
+MYSQL_DUMP_DIR: Couldn't find table: "\d-2-1.sql"
+
+MYSQL_DUMP_DIR: Couldn't find table: "\t1"
+
+MYSQL_DUMP_DIR: Couldn't find table: "\t1"
+
+MYSQL_DUMP_DIR: Couldn't find table: "\\t1"
+
+MYSQL_DUMP_DIR: Couldn't find table: "t\1"
+
+MYSQL_DUMP_DIR: Couldn't find table: "t\1"
+
+MYSQL_DUMP_DIR: Couldn't find table: "t/1"
+
+test_sequence
+------ Testing with illegal database names ------
+MYSQL_DUMP_DIR: Got error: 1049: Unknown database 'mysqldump_test_d' when selecting the database
+MYSQL_DUMP_DIR: Got error: 1102: Incorrect database name 'mysqld\ump_test_db' when selecting the database
+drop table t1, t2, t3;
+drop database mysqldump_test_db;
CREATE DATABASE mysqldump_test_db;
USE mysqldump_test_db;
CREATE TABLE t1 ( a INT );
--- 1.34/mysql-test/t/mysqldump.test 2005-06-10 16:26:20 +02:00
+++ 1.35/mysql-test/t/mysqldump.test 2005-06-20 15:09:50 +02:00
@@ -149,7 +149,7 @@
# if it is explicitely set.
CREATE TABLE t1 (a CHAR(10));
+INSERT INTO t1 VALUES (_latin1 'ÄÖÜß');
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments test t1
#
# Bug#8063: make test mysqldump [ fail ]
@@ -543,6 +543,84 @@
INSERT INTO t1 VALUES (1),(2),(3);
--exec $MYSQL_DUMP --add-drop-database --skip-comments --databases test
DROP TABLE t1;
+
+#
+# Testing with tables and databases that don't exists
+# or contains illegal characters
+# (Bug #9358 mysqldump crashes if tablename starts with \)
+#
+create database mysqldump_test_db;
+use mysqldump_test_db;
+create table t1(a varchar(30) primary key, b int not null);
+create table t2(a varchar(30) primary key, b int not null);
+create table t3(a varchar(30) primary key, b int not null);
+
+--disable_query_log
+select '------ Testing with illegal table names ------' as test_sequence ;
+--enable_query_log
+--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
+--error 6
+--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "\d-2-1.sql" 2>&1
+
+--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
+--error 6
+--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "\t1" 2>&1
+
+--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
+--error 6
+--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "\\t1" 2>&1
+
+--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
+--error 6
+--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "\\\\t1" 2>&1
+
+--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
+--error 6
+--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "t\1" 2>&1
+
+--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
+--error 6
+--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "t\\1" 2>&1
+
+--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
+--error 6
+--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "t/1" 2>&1
+
+--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
+--error 6
+--exec $MYSQL_DUMP --compact --skip-comments "mysqldump_test_db" "T_1"
+
+--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
+--error 6
+--exec $MYSQL_DUMP --compact --skip-comments "mysqldump_test_db" "T%1"
+
+--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
+--error 6
+--exec $MYSQL_DUMP --compact --skip-comments "mysqldump_test_db" "T'1"
+
+--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
+--error 6
+--exec $MYSQL_DUMP --compact --skip-comments "mysqldump_test_db" "T_1"
+
+--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
+--error 6
+--exec $MYSQL_DUMP --compact --skip-comments "mysqldump_test_db" "T_"
+
+--disable_query_log
+select '------ Testing with illegal database names ------' as test_sequence ;
+--enable_query_log
+--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
+--error 2
+--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_d 2>&1
+
+--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
+--error 2
+--exec $MYSQL_DUMP --compact --skip-comments "mysqld\ump_test_db" 2>&1
+
+drop table t1, t2, t3;
+drop database mysqldump_test_db;
+
+
#
# Bug #9558 mysqldump --no-data db t1 t2 format still dumps data
| Thread |
|---|
| • bk commit into 4.1 tree (msvensson:1.2292) | msvensson | 20 Jun |