List:Commits« Previous MessageNext Message »
From:kgeorge Date:June 5 2007 9:35am
Subject:bk commit into 5.1 tree (gkodinov:1.2546)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of kgeorge. When kgeorge 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-06-05 10:35:41+03:00, gkodinov@stripped +3 -0
  Merge gkodinov@stripped:/home/bk/mysql-5.1-opt
  into  magare.gmz:/home/kgeorge/mysql/autopush/B28488-5.1-opt
  MERGE: 1.2511.1.9

  sql/mysql_priv.h@stripped, 2007-06-05 10:35:41+03:00, gkodinov@stripped +0 -0
    SCCS merged
    MERGE: 1.510.1.1

  sql/sql_partition.cc@stripped, 2007-06-05 10:35:41+03:00, gkodinov@stripped +0 -0
    SCCS merged
    MERGE: 1.103.1.2

  sql/sql_table.cc@stripped, 2007-06-05 10:35:41+03:00, gkodinov@stripped +0 -0
    SCCS merged
    MERGE: 1.416.1.6

# 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:	gkodinov
# Host:	magare.gmz
# Root:	/home/kgeorge/mysql/autopush/B28488-5.1-opt/RESYNC

--- 1.511/sql/mysql_priv.h	2007-06-01 10:43:52 +03:00
+++ 1.512/sql/mysql_priv.h	2007-06-05 10:35:41 +03:00
@@ -1925,6 +1925,8 @@ uint filename_to_tablename(const char *f
 uint tablename_to_filename(const char *from, char *to, uint to_length);
 uint build_table_filename(char *buff, size_t bufflen, const char *db,
                           const char *table, const char *ext, uint flags);
+uint build_table_shadow_filename(char *buff, size_t bufflen, 
+                                 ALTER_PARTITION_PARAM_TYPE *lpt);
 /* Flags for conversion functions. */
 #define FN_FROM_IS_TMP  (1 << 0)
 #define FN_TO_IS_TMP    (1 << 1)

--- 1.427/sql/sql_table.cc	2007-06-04 13:14:21 +03:00
+++ 1.428/sql/sql_table.cc	2007-06-05 10:35:41 +03:00
@@ -1161,6 +1161,31 @@ void release_ddl_log()
 */
 
 
+/**
+   @brief construct a temporary shadow file name.
+
+   @details Make a shadow file name used by ALTER TABLE to construct the
+   modified table (with keeping the original). The modified table is then
+   moved back as original table. The name must start with the temp file
+   prefix so it gets filtered out by table files listing routines. 
+    
+   @param[out] buff      buffer to receive the constructed name
+   @param      bufflen   size of buff
+   @param      lpt       alter table data structure
+
+   @retval     path length
+*/
+
+uint build_table_shadow_filename(char *buff, size_t bufflen, 
+                                 ALTER_PARTITION_PARAM_TYPE *lpt)
+{
+  char tmp_name[FN_REFLEN];
+  my_snprintf (tmp_name, sizeof (tmp_name), "%s-%s", tmp_file_prefix,
+               lpt->table_name);
+  return build_table_filename(buff, bufflen, lpt->db, tmp_name, "", FN_IS_TMP);
+}
+
+
 /*
   SYNOPSIS
     mysql_write_frm()
@@ -1201,8 +1226,7 @@ bool mysql_write_frm(ALTER_PARTITION_PAR
   /*
     Build shadow frm file name
   */
-  build_table_filename(shadow_path, sizeof(shadow_path), lpt->db,
-                       lpt->table_name, "#", 0);
+  build_table_shadow_filename(shadow_path, sizeof(shadow_path), lpt);
   strxmov(shadow_frm_name, shadow_path, reg_ext, NullS);
   if (flags & WFRM_WRITE_SHADOW)
   {

--- 1.106/sql/sql_partition.cc	2007-06-01 10:43:54 +03:00
+++ 1.107/sql/sql_partition.cc	2007-06-05 10:35:41 +03:00
@@ -5459,8 +5459,7 @@ static bool write_log_drop_shadow_frm(AL
   char shadow_path[FN_LEN];
   DBUG_ENTER("write_log_drop_shadow_frm");
 
-  build_table_filename(shadow_path, sizeof(shadow_path), lpt->db,
-                       lpt->table_name, "#", 0);
+  build_table_shadow_filename(shadow_path, sizeof(shadow_path), lpt);
   pthread_mutex_lock(&LOCK_gdl);
   if (write_log_replace_delete_frm(lpt, 0UL, NULL,
                                   (const char*)shadow_path, FALSE))
@@ -5508,8 +5507,7 @@ static bool write_log_rename_frm(ALTER_P
   part_info->first_log_entry= NULL;
   build_table_filename(path, sizeof(path), lpt->db,
                        lpt->table_name, "", 0);
-  build_table_filename(shadow_path, sizeof(shadow_path), lpt->db,
-                       lpt->table_name, "#", 0);
+  build_table_shadow_filename(shadow_path, sizeof(shadow_path), lpt);
   pthread_mutex_lock(&LOCK_gdl);
   if (write_log_replace_delete_frm(lpt, 0UL, shadow_path, path, TRUE))
     goto error;
@@ -5674,8 +5672,7 @@ static bool write_log_final_change_parti
   part_info->first_log_entry= NULL;
   build_table_filename(path, sizeof(path), lpt->db,
                        lpt->table_name, "", 0);
-  build_table_filename(shadow_path, sizeof(shadow_path), lpt->db,
-                       lpt->table_name, "#", 0);
+  build_table_shadow_filename(shadow_path, sizeof(shadow_path), lpt);
   pthread_mutex_lock(&LOCK_gdl);
   if (write_log_dropped_partitions(lpt, &next_entry, (const char*)path,
                       lpt->alter_info->flags & ALTER_REORGANIZE_PARTITION))
Thread
bk commit into 5.1 tree (gkodinov:1.2546)kgeorge5 Jun