Below is the list of changes that have just been committed into a local
6.0 repository of antony. When antony 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, 2008-03-14 11:21:09-07:00, antony@stripped +5 -0
fix valgrind warnings
sql/ha_partition.cc@stripped, 2008-03-14 11:21:03-07:00, antony@stripped +18 -7
fix valgrind warnings
sql/ha_partition.h@stripped, 2008-03-14 11:21:03-07:00, antony@stripped +1 -1
fix valgrind warnings
sql/handler.cc@stripped, 2008-03-14 11:21:03-07:00, antony@stripped +2 -2
fix valgrind warnings
sql/handler.h@stripped, 2008-03-14 11:21:04-07:00, antony@stripped +2 -2
fix valgrind warnings
sql/sql_partition.cc@stripped, 2008-03-14 11:21:04-07:00, antony@stripped +1 -1
fix valgrind warnings
diff -Nrup a/sql/ha_partition.cc b/sql/ha_partition.cc
--- a/sql/ha_partition.cc 2008-03-12 16:52:51 -07:00
+++ b/sql/ha_partition.cc 2008-03-14 11:21:03 -07:00
@@ -581,7 +581,7 @@ int ha_partition::create(const char *nam
drop (each partition has a state attached to it)
*/
-int ha_partition::drop_partitions(const char *path)
+int ha_partition::drop_partitions(THD *thd, const char *path)
{
List_iterator<partition_element> part_it(m_part_info->partitions);
char part_name_buff[FN_REFLEN];
@@ -627,12 +627,13 @@ int ha_partition::drop_partitions(const
create_partition_name(part_name_buff, path,
part_elem->partition_name, name_variant,
TRUE);
- file= m_file[i];
+ file= get_new_handler(0, thd->mem_root, m_file[i]->ht);
DBUG_PRINT("info", ("Drop partition %s", part_name_buff));
if ((ret_error= file->ha_delete_table(part_name_buff)))
error= ret_error;
if (deactivate_ddl_log_entry(part_elem->log_entry->entry_pos))
error= 1;
+ delete file;
}
if (part_elem->part_state == PART_IS_CHANGED)
part_elem->part_state= PART_NORMAL;
@@ -701,7 +702,8 @@ int ha_partition::rename_partitions(THD
do
{
sub_elem= sub_it++;
- file= m_reorged_file[part_count++];
+ file= get_new_handler(0, thd->mem_root,
+ m_reorged_file[part_count++]->ht);
create_subpartition_name(norm_name_buff, path,
part_elem->partition_name,
sub_elem->partition_name,
@@ -713,11 +715,13 @@ int ha_partition::rename_partitions(THD
error= 1;
else
sub_elem->log_entry= NULL; /* Indicate success */
+ delete file;
} while (++j < no_subparts);
}
else
{
- file= m_reorged_file[part_count++];
+ file= get_new_handler(0, thd->mem_root,
+ m_reorged_file[part_count++]->ht);
create_partition_name(norm_name_buff, path,
part_elem->partition_name, NORMAL_PART_NAME,
TRUE);
@@ -728,6 +732,7 @@ int ha_partition::rename_partitions(THD
error= 1;
else
part_elem->log_entry= NULL; /* Indicate success */
+ delete file;
}
} while (++i < temp_partitions);
VOID(sync_ddl_log());
@@ -776,15 +781,18 @@ int ha_partition::rename_partitions(THD
NORMAL_PART_NAME);
if (part_elem->part_state == PART_IS_CHANGED)
{
- file= m_reorged_file[part_count++];
+ file= get_new_handler(0, thd->mem_root,
+ m_reorged_file[part_count++]->ht);
DBUG_PRINT("info", ("Delete subpartition %s", norm_name_buff));
if ((ret_error= file->ha_delete_table(norm_name_buff)))
error= ret_error;
else if (deactivate_ddl_log_entry(sub_elem->log_entry->entry_pos))
error= 1;
VOID(sync_ddl_log());
+ delete file;
}
- file= m_new_file[part];
+ file= get_new_handler(0, thd->mem_root,
+ m_new_file[part]->ht);
create_subpartition_name(part_name_buff, path,
part_elem->partition_name,
sub_elem->partition_name,
@@ -798,6 +806,7 @@ int ha_partition::rename_partitions(THD
error= 1;
else
sub_elem->log_entry= NULL;
+ delete file;
} while (++j < no_subparts);
}
else
@@ -817,7 +826,8 @@ int ha_partition::rename_partitions(THD
VOID(sync_ddl_log());
delete file;
}
- file= m_new_file[i];
+ file= get_new_handler(0, thd->mem_root,
+ m_new_file[i]->ht);
create_partition_name(part_name_buff, path,
part_elem->partition_name, TEMP_PART_NAME,
TRUE);
@@ -830,6 +840,7 @@ int ha_partition::rename_partitions(THD
error= 1;
else
part_elem->log_entry= NULL;
+ delete file;
}
}
} while (++i < no_parts);
diff -Nrup a/sql/ha_partition.h b/sql/ha_partition.h
--- a/sql/ha_partition.h 2008-03-12 13:14:32 -07:00
+++ b/sql/ha_partition.h 2008-03-14 11:21:03 -07:00
@@ -201,7 +201,7 @@ public:
ulonglong *deleted,
const uchar *pack_frm_data,
size_t pack_frm_len);
- virtual int drop_partitions(const char *path);
+ virtual int drop_partitions(THD *thd, const char *path);
virtual int rename_partitions(THD *thd, const char *path);
bool get_no_parts(const char *name, uint *no_parts)
{
diff -Nrup a/sql/handler.cc b/sql/handler.cc
--- a/sql/handler.cc 2008-03-12 16:52:51 -07:00
+++ b/sql/handler.cc 2008-03-14 11:21:03 -07:00
@@ -3261,11 +3261,11 @@ handler::ha_change_partitions(HA_CREATE_
*/
int
-handler::ha_drop_partitions(const char *path)
+handler::ha_drop_partitions(THD *thd, const char *path)
{
mark_trx_read_write();
- return drop_partitions(path);
+ return drop_partitions(thd, path);
}
diff -Nrup a/sql/handler.h b/sql/handler.h
--- a/sql/handler.h 2008-03-12 13:14:33 -07:00
+++ b/sql/handler.h 2008-03-14 11:21:04 -07:00
@@ -1496,7 +1496,7 @@ public:
ulonglong *deleted,
const uchar *pack_frm_data,
size_t pack_frm_len);
- int ha_drop_partitions(const char *path);
+ int ha_drop_partitions(THD *thd, const char *path);
int ha_rename_partitions(THD *thd, const char *path);
int ha_optimize_partitions(THD *thd);
int ha_analyze_partitions(THD *thd);
@@ -2296,7 +2296,7 @@ private:
const uchar *pack_frm_data,
size_t pack_frm_len)
{ return HA_ERR_WRONG_COMMAND; }
- virtual int drop_partitions(const char *path)
+ virtual int drop_partitions(THD *thd, const char *path)
{ return HA_ERR_WRONG_COMMAND; }
virtual int rename_partitions(THD *thd, const char *path)
{ return HA_ERR_WRONG_COMMAND; }
diff -Nrup a/sql/sql_partition.cc b/sql/sql_partition.cc
--- a/sql/sql_partition.cc 2008-03-12 13:14:33 -07:00
+++ b/sql/sql_partition.cc 2008-03-14 11:21:04 -07:00
@@ -5126,7 +5126,7 @@ static bool mysql_drop_partitions(ALTER_
DBUG_ENTER("mysql_drop_partitions");
build_table_filename(path, sizeof(path), lpt->db, lpt->table_name, "", 0);
- if ((error= lpt->table->file->ha_drop_partitions(path)))
+ if ((error= lpt->table->file->ha_drop_partitions(lpt->thd, path)))
{
lpt->table->file->print_error(error, MYF(0));
DBUG_RETURN(TRUE);
| Thread |
|---|
| • bk commit into 6.0 tree (antony:1.2597) | antony | 14 Mar |