List:Commits« Previous MessageNext Message »
From:rsomla Date:April 3 2007 7:30pm
Subject:bk commit into 5.1 tree (rafal:1.2506)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of rafal. When rafal 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, 2007-04-03 21:30:04+02:00, rafal@quant.(none) +1 -0
  Added documentation and comments to get_create_stmt().

  sql/backup/meta_backup.cc@stripped, 2007-04-03 21:30:01+02:00, rafal@quant.(none) +21 -8
    Added documentation and comments to get_create_stmt(). Changed 
    location of declarations since otherwise win build is broken. 

# 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:	rafal
# Host:	quant.(none)
# Root:	/ext/mysql/bk/backup/prototype

--- 1.5/sql/backup/meta_backup.cc	2007-04-03 21:30:10 +02:00
+++ 1.6/sql/backup/meta_backup.cc	2007-04-03 21:30:10 +02:00
@@ -251,9 +251,25 @@
   DBUG_RETURN(TRUE);
 }
 
+/**
+ Produce a CREATE TABLE statement corresponding to a given table.
+
+ @note The statement uses qualified table name (<db name>.<table>) so
+ that it works correctly regardless of the current database.
+
+ @param tbl (in)  open TABLE_LIST structure for the table
+ @param s   (out) String where the statement is stored.
+
+ @returns TRUE if there were errors, FALSE otherwise.
+ */
 
 bool get_create_stmt(THD *thd, TABLE_LIST *tbl, String &s)
 {
+  String table_name;        // Buffer to store table name
+  uint len;                 // store length of the table name
+  int index= 0;             // index of table name in create string
+  int period= 0;            // index of "." in create string
+
   DBUG_ENTER("backup::get_create_stmt");
 
   /*
@@ -271,15 +287,12 @@
   if (res)
     DBUG_RETURN(TRUE);
 
-  String table_name;        // Buffer to store table name
-  uint len;                 // store length of the table name
-  int index= 0;             // index of table name in create string
-  int period= 0;            // index of "." in create string
-
   /*
-    Capture the table name then create a database.table string
-    for inserting into the CREATE statement in replace of the
-    table name.
+    Aparrently, it is not possible to make the store_create_info() function
+    produce a CREATE TABLE statement with qualified table names.
+
+    Therefore we modify the returned statement replacing table name with the
+    qualified one.
   */
 
   table_name.length(0);
Thread
bk commit into 5.1 tree (rafal:1.2506)rsomla3 Apr