List:Commits« Previous MessageNext Message »
From:Ignacio Galarza Date:July 18 2006 8:49pm
Subject:bk commit into 5.0 tree (iggy:1.2229)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of iggy. When iggy 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@stripped, 2006-07-18 14:48:59-04:00, iggy@stripped +4 -0
  Merge rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-5.0-release
  into  rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-5.0
  MERGE: 1.2191.24.19

  client/mysqldump.c@stripped, 2006-07-18 14:48:56-04:00, iggy@stripped +0
-9
    manual merge.
    MERGE: 1.232.2.2

  mysql-test/r/mysqldump.result@stripped, 2006-07-18 14:48:57-04:00,
iggy@stripped +37 -67
    manual merge.
    MERGE: 1.100.2.2

  mysql-test/t/mysqldump.test@stripped, 2006-07-18 14:48:57-04:00,
iggy@stripped +3 -22
    manual merge.
    MERGE: 1.93.1.2

  support-files/mysql.spec.sh@stripped, 2006-07-18 14:30:17-04:00,
iggy@stripped +0 -6
    Auto merged
    MERGE: 1.146.1.1

# 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:	iggy
# Host:	rolltop.ignatz42.dyndns.org
# Root:	/mnt/storeage/mysql-5.0/RESYNC

--- 1.234/client/mysqldump.c	2006-07-18 14:49:03 -04:00
+++ 1.235/client/mysqldump.c	2006-07-18 14:49:03 -04:00
@@ -2640,7 +2640,7 @@
       /*
         length of table name * 2 (if name contains quotes), 2 quotes and 0
       */
-      char quoted_database_buf[64*2+3];
+      char quoted_database_buf[NAME_LEN*2+3];
       char *qdatabase= quote_name(database,quoted_database_buf,opt_quoted);
       if (opt_comments)
       {
@@ -2789,7 +2789,18 @@
     DB_error(sock, "when selecting the database");
     return 1;
   }
-
+  if (opt_databases || opt_alldbs)
+  {
+    char quoted_database_buf[NAME_LEN*2+3];
+    char *qdatabase= quote_name(database,quoted_database_buf,opt_quoted);
+    if (opt_comments)
+    {
+      fprintf(md_result_file,"\n--\n-- Current Database: %s\n--\n", qdatabase);
+      check_io(md_result_file);
+    }
+    fprintf(md_result_file,"\nUSE %s;\n", qdatabase);
+    check_io(md_result_file);
+  }
   if (opt_xml)
     print_xml_tag1(md_result_file, "", "database name=", database, "\n");
   if (lock_tables)
@@ -3242,7 +3253,7 @@
   MYSQL_RES  *res = NULL;
   MYSQL_ROW  row;
   /* SHOW KEYS FROM + table name * 2 (escaped) + 2 quotes + \0 */
-  char show_keys_buff[15 + 64 * 2 + 3];
+  char show_keys_buff[15 + NAME_LEN * 2 + 3];
   uint result_length = 0;
   char *result = 0;
 

--- 1.103/mysql-test/r/mysqldump.result	2006-07-18 14:49:03 -04:00
+++ 1.104/mysql-test/r/mysqldump.result	2006-07-18 14:49:03 -04:00
@@ -433,7 +433,7 @@
 
 drop database mysqldump_test_db;
 CREATE TABLE t1 (a  CHAR(10));
-INSERT INTO t1  VALUES (_latin1 'ÄÖÜß');
+INSERT INTO t1  VALUES (_latin1 'ÄÖÜß');
 
 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -478,7 +478,7 @@
 
 LOCK TABLES `t1` WRITE;
 /*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES ('Ž™šá');
+INSERT INTO `t1` VALUES ('Ž™šá');
 /*!40000 ALTER TABLE `t1` ENABLE KEYS */;
 UNLOCK TABLES;
 /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -501,7 +501,7 @@
 
 LOCK TABLES `t1` WRITE;
 /*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES ('Ž™šá');
+INSERT INTO `t1` VALUES ('Ž™šá');
 /*!40000 ALTER TABLE `t1` ENABLE KEYS */;
 UNLOCK TABLES;
 /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -1675,11 +1675,11 @@
 insert t1 values (0x4F736E616272C3BC636B, 0x4BF66C6E);
 select * from t1;
 a	b
-Osnabrück	Köln
+Osnabrück	Köln
 test.t1: Records: 1  Deleted: 0  Skipped: 0  Warnings: 0
 select * from t1;
 a	b
-Osnabrück	Köln
+Osnabrück	Köln
 drop table t1;
 create table `t1` (
 t1_name varchar(255) default null,
@@ -2470,6 +2470,8 @@
   `b` varchar(32),
   `c` varchar(32)
 ) */;
+
+USE `test`;
 /*!50001 DROP TABLE IF EXISTS `v0`*/;
 /*!50001 DROP VIEW IF EXISTS `v0`*/;
 /*!50001 CREATE ALGORITHM=UNDEFINED */
@@ -2789,6 +2791,8 @@
 /*!50001 CREATE TABLE `v1` (
   `id` int(11)
 ) */;
+
+USE `mysqldump_test_db`;
 /*!50001 DROP TABLE IF EXISTS `v1`*/;
 /*!50001 DROP VIEW IF EXISTS `v1`*/;
 /*!50001 CREATE ALGORITHM=UNDEFINED */
@@ -2848,6 +2852,10 @@
 /*!50001 CREATE TABLE `nasishnasifu` (
   `id` bigint(20) unsigned
 ) */;
+
+USE `mysqldump_tables`;
+
+USE `mysqldump_views`;
 /*!50001 DROP TABLE IF EXISTS `nasishnasifu`*/;
 /*!50001 DROP VIEW IF EXISTS `nasishnasifu`*/;
 /*!50001 CREATE ALGORITHM=UNDEFINED */
@@ -2867,3 +2875,34 @@
 drop database mysqldump_views;
 drop table mysqldump_tables.basetable;
 drop database mysqldump_tables;
+create database mysqldump_dba;
+use mysqldump_dba;
+create table t1 (f1 int, f2 int);
+insert into t1 values (1,1);
+create view v1 as select f1, f2 from t1;
+create database mysqldump_dbb;
+use mysqldump_dbb;
+create table t1 (f1 int, f2 int);
+insert into t1 values (2,2);
+create view v1 as select f1, f2 from t1;
+drop view v1;
+drop table t1;
+drop database mysqldump_dbb;
+use mysqldump_dba;
+drop view v1;
+drop table t1;
+drop database mysqldump_dba;
+select * from mysqldump_dba.v1;
+f1	f2
+1	1
+select * from mysqldump_dbb.v1;
+f1	f2
+2	2
+use mysqldump_dba;
+drop view v1;
+drop table t1;
+drop database mysqldump_dba;
+use mysqldump_dbb;
+drop view v1;
+drop table t1;
+drop database mysqldump_dbb;

--- 1.96/mysql-test/t/mysqldump.test	2006-07-18 14:49:03 -04:00
+++ 1.97/mysql-test/t/mysqldump.test	2006-07-18 14:49:03 -04:00
@@ -153,7 +153,7 @@
 # if it is explicitely set.
 
 CREATE TABLE t1 (a  CHAR(10));
-INSERT INTO t1  VALUES (_latin1 'ÄÖÜß');
+INSERT INTO t1  VALUES (_latin1 'ÄÖÜß');
 --exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments test t1
 #
 # Bug#8063: make test mysqldump [ fail ]
@@ -1228,3 +1228,41 @@
 drop database mysqldump_views;
 drop table mysqldump_tables.basetable;
 drop database mysqldump_tables;
+
+# Bug20221 Dumping of multiple databases containing view(s) yields maleformed dumps
+
+create database mysqldump_dba;
+use mysqldump_dba;
+create table t1 (f1 int, f2 int);
+insert into t1 values (1,1);
+create view v1 as select f1, f2 from t1;
+
+create database mysqldump_dbb;
+use mysqldump_dbb;
+create table t1 (f1 int, f2 int);
+insert into t1 values (2,2);
+create view v1 as select f1, f2 from t1;
+
+--exec $MYSQL_DUMP --skip-comments --add-drop-database --databases mysqldump_dba
mysqldump_dbb > $MYSQLTEST_VARDIR/tmp/bug20221_backup;
+
+drop view v1;
+drop table t1;
+drop database mysqldump_dbb;
+use mysqldump_dba;
+drop view v1;
+drop table t1;
+drop database mysqldump_dba;
+
+--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20221_backup;
+
+select * from mysqldump_dba.v1;
+select * from mysqldump_dbb.v1;
+
+use mysqldump_dba;
+drop view v1;
+drop table t1;
+drop database mysqldump_dba;
+use mysqldump_dbb;
+drop view v1;
+drop table t1;
+drop database mysqldump_dbb;
Thread
bk commit into 5.0 tree (iggy:1.2229)Ignacio Galarza18 Jul