summaryrefslogtreecommitdiff
path: root/sql/sql_partition.cc
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@sun.com>2008-11-12 13:36:53 +0100
committerMattias Jonsson <mattias.jonsson@sun.com>2008-11-12 13:36:53 +0100
commit1c9df573c9c0903e4daaac90b7defd52a52ed337 (patch)
tree834e989af9a9fe483ba349bda96272979c7c4dae /sql/sql_partition.cc
parent50afc54efa24f82bd5493d227b34ca1dd3faa5f6 (diff)
downloadmariadb-git-1c9df573c9c0903e4daaac90b7defd52a52ed337.tar.gz
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. 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
Diffstat (limited to 'sql/sql_partition.cc')
-rw-r--r--sql/sql_partition.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc
index 5ed64ea8fd5..8eabded623c 100644
--- a/sql/sql_partition.cc
+++ b/sql/sql_partition.cc
@@ -5304,8 +5304,8 @@ static bool write_log_changed_partitions(ALTER_PARTITION_PARAM_TYPE *lpt,
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(ALTER_PARTITION_PARAM_TYPE *lpt)
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_PARTITION_PARAM_TYPE *lpt)
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(ALTER_PARTITION_PARAM_TYPE *lpt)
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_partition(ALTER_PARTITION_PARAM_TYPE *lpt)
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_partition(ALTER_PARTITION_PARAM_TYPE *lpt)
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");