List:Commits« Previous MessageNext Message »
From:Mattias Jonsson Date:November 12 2008 12:37pm
Subject:bzr commit into mysql-5.1 branch (mattias.jonsson:2706) Bug#38784
View as plain text  
#At file:///Users/mattiasj/clones/bzrroot/b38784-51-bugteam/

 2706 Mattias Jonsson	2008-11-12
      Bug#38784: Mysql server crash if table is altered with partition changes.
      
      Occurred with EXTRA_DEBUG on windows.
      
      Problem was insufficient length of a local variable that stored path names.
      
      Solution was to use the correct length.
modified:
  CMakeLists.txt
  sql/sql_partition.cc
  win/configure.js

per-file messages:
  CMakeLists.txt
    Bug#38784: Mysql server crash if table is altered with partition changes.
    
    Added support for EXTRA_DEBUG
  sql/sql_partition.cc
    Bug#38784: Mysql server crash if table is altered with partition changes.
    
    Changed from FN_LEN to FN_REFLEN since the variable was use for paths,
    not filenames without path.
  win/configure.js
    Bug#38784: Mysql server crash if table is altered with partition changes.
    
    Added support for EXTRA_DEBUG
=== modified file 'CMakeLists.txt'
--- a/CMakeLists.txt	2008-09-01 09:48:21 +0000
+++ b/CMakeLists.txt	2008-11-12 12:36:53 +0000
@@ -98,6 +98,10 @@ IF(CYBOZU)
   ADD_DEFINITIONS(-DCYBOZU)
 ENDIF(CYBOZU)
 
+IF(EXTRA_DEBUG)
+  ADD_DEFINITIONS(-D EXTRA_DEBUG)
+ENDIF(EXTRA_DEBUG)
+
 # in some places we use DBUG_OFF
 SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DDBUG_OFF")
 SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DDBUG_OFF")

=== modified file 'sql/sql_partition.cc'
--- a/sql/sql_partition.cc	2008-11-04 08:36:56 +0000
+++ b/sql/sql_partition.cc	2008-11-12 12:36:53 +0000
@@ -5304,8 +5304,8 @@ static bool write_log_changed_partitions
   DDL_LOG_ENTRY ddl_log_entry;
   partition_info *part_info= lpt->part_info;
   DDL_LOG_MEMORY_ENTRY *log_entry;
-  char tmp_path[FN_LEN];
-  char normal_path[FN_LEN];
+  char tmp_path[FN_REFLEN];
+  char normal_path[FN_REFLEN];
   List_iterator<partition_element> part_it(part_info->partitions);
   uint temp_partitions= part_info->temp_partitions.elements;
   uint no_elements= part_info->partitions.elements;
@@ -5516,7 +5516,7 @@ static bool write_log_drop_shadow_frm(AL
   partition_info *part_info= lpt->part_info;
   DDL_LOG_MEMORY_ENTRY *log_entry;
   DDL_LOG_MEMORY_ENTRY *exec_log_entry= NULL;
-  char shadow_path[FN_LEN];
+  char shadow_path[FN_REFLEN];
   DBUG_ENTER("write_log_drop_shadow_frm");
 
   build_table_shadow_filename(shadow_path, sizeof(shadow_path), lpt);
@@ -5559,8 +5559,8 @@ static bool write_log_rename_frm(ALTER_P
   partition_info *part_info= lpt->part_info;
   DDL_LOG_MEMORY_ENTRY *log_entry;
   DDL_LOG_MEMORY_ENTRY *exec_log_entry= part_info->exec_log_entry;
-  char path[FN_LEN];
-  char shadow_path[FN_LEN];
+  char path[FN_REFLEN];
+  char shadow_path[FN_REFLEN];
   DDL_LOG_MEMORY_ENTRY *old_first_log_entry= part_info->first_log_entry;
   DBUG_ENTER("write_log_rename_frm");
 
@@ -5610,8 +5610,8 @@ static bool write_log_drop_partition(ALT
   partition_info *part_info= lpt->part_info;
   DDL_LOG_MEMORY_ENTRY *log_entry;
   DDL_LOG_MEMORY_ENTRY *exec_log_entry= part_info->exec_log_entry;
-  char tmp_path[FN_LEN];
-  char path[FN_LEN];
+  char tmp_path[FN_REFLEN];
+  char path[FN_REFLEN];
   uint next_entry= 0;
   DDL_LOG_MEMORY_ENTRY *old_first_log_entry= part_info->first_log_entry;
   DBUG_ENTER("write_log_drop_partition");
@@ -5669,8 +5669,8 @@ static bool write_log_add_change_partiti
   partition_info *part_info= lpt->part_info;
   DDL_LOG_MEMORY_ENTRY *log_entry;
   DDL_LOG_MEMORY_ENTRY *exec_log_entry= NULL;
-  char tmp_path[FN_LEN];
-  char path[FN_LEN];
+  char tmp_path[FN_REFLEN];
+  char path[FN_REFLEN];
   uint next_entry= 0;
   DBUG_ENTER("write_log_add_change_partition");
 
@@ -5723,8 +5723,8 @@ static bool write_log_final_change_parti
   partition_info *part_info= lpt->part_info;
   DDL_LOG_MEMORY_ENTRY *log_entry;
   DDL_LOG_MEMORY_ENTRY *exec_log_entry= part_info->exec_log_entry;
-  char path[FN_LEN];
-  char shadow_path[FN_LEN];
+  char path[FN_REFLEN];
+  char shadow_path[FN_REFLEN];
   DDL_LOG_MEMORY_ENTRY *old_first_log_entry= part_info->first_log_entry;
   uint next_entry= 0;
   DBUG_ENTER("write_log_final_change_partition");

=== modified file 'win/configure.js'
--- a/win/configure.js	2007-09-21 16:05:54 +0000
+++ b/win/configure.js	2008-11-12 12:36:53 +0000
@@ -48,6 +48,7 @@ try 
             case "__NT__":
             case "CYBOZU":
             case "EMBED_MANIFESTS":
+            case "EXTRA_DEBUG":
             case "WITH_EMBEDDED_SERVER":
                     configfile.WriteLine("SET (" + args.Item(i) + " TRUE)");
                     break;

Thread
bzr commit into mysql-5.1 branch (mattias.jonsson:2706) Bug#38784Mattias Jonsson12 Nov