MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:tomas Date:February 2 2006 9:56am
Subject:bk commit into 5.1 tree (tomas:1.2127) BUG#16753
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas 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.2127 06/02/02 10:56:04 tomas@stripped +3 -0
  Bug #16753    DD: mysqldump does not support Cluster Disk Data backups

  mysql-test/t/ndb_dd_dump.test
    1.2 06/02/02 10:55:57 tomas@stripped +13 -3
    Bug #16753    DD: mysqldump does not support Cluster Disk Data backups

  mysql-test/r/ndb_dd_dump.result
    1.2 06/02/02 10:55:57 tomas@stripped +21 -12
    Bug #16753    DD: mysqldump does not support Cluster Disk Data backups

  client/mysqldump.c
    1.222 06/02/02 10:55:57 tomas@stripped +48 -35
    Bug #16753    DD: mysqldump does not support Cluster Disk Data backups

# 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:	tomas
# Host:	poseidon.ndb.mysql.com
# Root:	/home/tomas/mysql-5.1-release

--- 1.221/client/mysqldump.c	2006-02-02 00:52:51 +01:00
+++ 1.222/client/mysqldump.c	2006-02-02 10:55:57 +01:00
@@ -2489,14 +2489,15 @@
   int first;
 
   if (mysql_query_with_error_report(sock, &tableres,
-                                    "SELECT DISTINCT "
-                                    "LOGFILE_GROUP_NAME,"
-                                    "FILE_NAME,"
-                                    "INITIAL_SIZE,"
-                                    "ENGINE "
-                                    "FROM INFORMATION_SCHEMA.FILES "
-                                    "WHERE FILE_TYPE = \"UNDO LOG\" "
-                                    "ORDER BY LOGFILE_GROUP_NAME"))
+                                    "SELECT DISTINCT"
+                                    " LOGFILE_GROUP_NAME,"
+                                    " FILE_NAME,"
+                                    " TOTAL_EXTENTS,"
+                                    " INITIAL_SIZE,"
+                                    " ENGINE"
+                                    " FROM INFORMATION_SCHEMA.FILES"
+                                    " WHERE FILE_TYPE = \"UNDO LOG\""
+                                    " ORDER BY LOGFILE_GROUP_NAME"))
     return 1;
 
   buf[0]= 0;
@@ -2506,14 +2507,12 @@
       first= 1;
     if (first)
     {
-      first= 0;
       if (!opt_xml && opt_comments)
       {
 	fprintf(md_result_file,"\n--\n-- Logfile group: %s\n--\n", row[0]);
 	check_io(md_result_file);
       }
       fprintf(md_result_file, "\nCREATE");
-      strxmov(buf, row[0], NullS);
     }
     else
     {
@@ -2521,27 +2520,39 @@
     }
     fprintf(md_result_file,
             " LOGFILE GROUP %s\n"
-            "  ADD UNDOFILE '%s'\n"
+            "  ADD UNDOFILE '%s'\n",
+            row[0],
+            row[1]);
+    if (first)
+    {
+      fprintf(md_result_file,
+              "  UNDO_BUFFER_SIZE %s\n",
+              row[2]);
+    }
+    fprintf(md_result_file,
             "  INITIAL_SIZE %s\n"
             "  ENGINE=%s;\n",
-            row[0],
-            row[1],
-            row[2],
-            row[3]
-            );
+            row[3],
+            row[4]);
     check_io(md_result_file);
+    if (first)
+    {
+      first= 0;
+      strxmov(buf, row[0], NullS);
+    }
   }
 
   if (mysql_query_with_error_report(sock, &tableres,
-                                    "SELECT DISTINCT "
-                                    "TABLESPACE_NAME,"
-                                    "LOGFILE_GROUP_NAME,"
-                                    "FILE_NAME,"
-                                    "INITIAL_SIZE,"
-                                    "ENGINE "
-                                    "FROM INFORMATION_SCHEMA.FILES "
-                                    "WHERE FILE_TYPE = \"DATAFILE\" "
-                                    "ORDER BY TABLESPACE_NAME, LOGFILE_GROUP_NAME"))
+                                    "SELECT DISTINCT"
+                                    " TABLESPACE_NAME,"
+                                    " FILE_NAME,"
+                                    " LOGFILE_GROUP_NAME,"
+                                    " EXTENT_SIZE,"
+                                    " INITIAL_SIZE,"
+                                    " ENGINE"
+                                    " FROM INFORMATION_SCHEMA.FILES"
+                                    " WHERE FILE_TYPE = \"DATAFILE\""
+                                    " ORDER BY TABLESPACE_NAME, LOGFILE_GROUP_NAME"))
     return 1;
 
   buf[0]= 0;
@@ -2557,7 +2568,6 @@
 	check_io(md_result_file);
       }
       fprintf(md_result_file, "\nCREATE");
-      strxmov(buf, row[0], NullS);
     }
     else
     {
@@ -2567,23 +2577,26 @@
             " TABLESPACE %s\n"
             "  ADD DATAFILE '%s'\n",
             row[0],
-            row[2]
-            );
+            row[1]);
     if (first)
     {
-      first= 0;
       fprintf(md_result_file,
-              "  USE LOGFILE GROUP %s\n",
-              row[1]
-              );
+              "  USE LOGFILE GROUP %s\n"
+              "  EXTENT_SIZE %s\n",
+              row[2],
+              row[3]);
     }
     fprintf(md_result_file,
             "  INITIAL_SIZE %s\n"
             "  ENGINE=%s;\n",
-            row[3],
-            row[4]
-            );
+            row[4],
+            row[5]);
     check_io(md_result_file);
+    if (first)
+    {
+      first= 0;
+      strxmov(buf, row[0], NullS);
+    }
   }
   return 0;
 }

--- 1.1/mysql-test/r/ndb_dd_dump.result	2006-02-02 00:52:51 +01:00
+++ 1.2/mysql-test/r/ndb_dd_dump.result	2006-02-02 10:55:57 +01:00
@@ -10,8 +10,8 @@
 ENGINE NDB;
 CREATE LOGFILE GROUP lg2
 ADD UNDOFILE 'undofile_lg2_01.dat'
-INITIAL_SIZE 2M
 UNDO_BUFFER_SIZE = 1M
+INITIAL_SIZE 2M
 ENGINE NDB;
 ALTER LOGFILE GROUP lg2
 ADD UNDOFILE 'undofile_lg2_02.dat'
@@ -20,6 +20,7 @@
 CREATE TABLESPACE ts1
 ADD DATAFILE 'datafile_ts1_01.dat'
 USE LOGFILE GROUP lg1
+EXTENT_SIZE 1M
 INITIAL_SIZE 2M
 ENGINE NDB;
 ALTER TABLESPACE ts1
@@ -174,22 +175,30 @@
 DROP LOGFILE GROUP lg1 ENGINE = NDB;
 DROP LOGFILE GROUP lg2 ENGINE = NDB;
 SELECT DISTINCT
+LOGFILE_GROUP_NAME,
+FILE_NAME,
+TOTAL_EXTENTS,
+INITIAL_SIZE,
+ENGINE
+FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="UNDO LOG" ORDER BY FILE_NAME;
+LOGFILE_GROUP_NAME	FILE_NAME	TOTAL_EXTENTS	INITIAL_SIZE	ENGINE
+lg1	undofile_lg1_01.dat	1048576	2097152	ndbcluster
+lg1	undofile_lg1_02.dat	1048576	4194304	ndbcluster
+lg2	undofile_lg2_01.dat	1048576	2097152	ndbcluster
+lg2	undofile_lg2_02.dat	1048576	4194304	ndbcluster
+SELECT DISTINCT
 TABLESPACE_NAME,
 LOGFILE_GROUP_NAME, 
-FILE_TYPE,
 FILE_NAME,
+EXTENT_SIZE,
 INITIAL_SIZE,
 ENGINE
-FROM INFORMATION_SCHEMA.FILES ORDER BY FILE_NAME;
-TABLESPACE_NAME	LOGFILE_GROUP_NAME	FILE_TYPE	FILE_NAME	INITIAL_SIZE	ENGINE
-ts1	lg1	DATAFILE	datafile_ts1_01.dat	2097152	ndbcluster
-ts1	lg1	DATAFILE	datafile_ts1_02.dat	1048576	ndbcluster
-ts2	lg1	DATAFILE	datafile_ts2_01.dat	2097152	ndbcluster
-ts3	lg2	DATAFILE	datafile_ts3_01.dat	4194304	ndbcluster
-ts3	lg1	UNDO LOG	undofile_lg1_01.dat	2097152	ndbcluster
-ts3	lg1	UNDO LOG	undofile_lg1_02.dat	4194304	ndbcluster
-ts3	lg2	UNDO LOG	undofile_lg2_01.dat	2097152	ndbcluster
-ts3	lg2	UNDO LOG	undofile_lg2_02.dat	4194304	ndbcluster
+FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="DATAFILE" ORDER BY FILE_NAME;
+TABLESPACE_NAME	LOGFILE_GROUP_NAME	FILE_NAME	EXTENT_SIZE	INITIAL_SIZE	ENGINE
+ts1	lg1	datafile_ts1_01.dat	1048576	2097152	ndbcluster
+ts1	lg1	datafile_ts1_02.dat	1048576	1048576	ndbcluster
+ts2	lg1	datafile_ts2_01.dat	1048576	2097152	ndbcluster
+ts3	lg2	datafile_ts3_01.dat	1048576	4194304	ndbcluster
 SELECT COUNT(*) FROM t1;
 COUNT(*)
 500

--- 1.1/mysql-test/t/ndb_dd_dump.test	2006-02-02 00:52:51 +01:00
+++ 1.2/mysql-test/t/ndb_dd_dump.test	2006-02-02 10:55:57 +01:00
@@ -17,8 +17,8 @@
 
 CREATE LOGFILE GROUP lg2
 ADD UNDOFILE 'undofile_lg2_01.dat'
-INITIAL_SIZE 2M
 UNDO_BUFFER_SIZE = 1M
+INITIAL_SIZE 2M
 ENGINE NDB;
 
 ALTER LOGFILE GROUP lg2
@@ -29,6 +29,7 @@
 CREATE TABLESPACE ts1
 ADD DATAFILE 'datafile_ts1_01.dat'
 USE LOGFILE GROUP lg1
+EXTENT_SIZE 1M
 INITIAL_SIZE 2M
 ENGINE NDB;
 
@@ -208,13 +209,22 @@
 --exec $MYSQL test < var/tmp/ndb_dd_dump.sql
 
 SELECT DISTINCT
+  LOGFILE_GROUP_NAME,
+  FILE_NAME,
+  TOTAL_EXTENTS,
+  INITIAL_SIZE,
+  ENGINE
+FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="UNDO LOG" ORDER BY FILE_NAME;
+
+SELECT DISTINCT
   TABLESPACE_NAME,
   LOGFILE_GROUP_NAME, 
-  FILE_TYPE,
   FILE_NAME,
+  EXTENT_SIZE,
   INITIAL_SIZE,
   ENGINE
-FROM INFORMATION_SCHEMA.FILES ORDER BY FILE_NAME;
+FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="DATAFILE" ORDER BY FILE_NAME;
+
 SELECT COUNT(*) FROM t1;
 SELECT COUNT(*) FROM t2;
 SELECT COUNT(*) FROM t3;
Thread
bk commit into 5.1 tree (tomas:1.2127) BUG#16753tomas2 Feb