summaryrefslogtreecommitdiff
path: root/sql/sql_partition_admin.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_partition_admin.cc')
-rw-r--r--sql/sql_partition_admin.cc28
1 files changed, 10 insertions, 18 deletions
diff --git a/sql/sql_partition_admin.cc b/sql/sql_partition_admin.cc
index 18f25ab7cf7..c727d749300 100644
--- a/sql/sql_partition_admin.cc
+++ b/sql/sql_partition_admin.cc
@@ -371,16 +371,14 @@ static bool exchange_name_with_ddl_log(THD *thd,
/* call rename table from table to tmp-name */
DBUG_EXECUTE_IF("exchange_partition_fail_3",
my_error(ER_ERROR_ON_RENAME, MYF(0),
- name, tmp_name, 0, "n/a");
+ name, tmp_name, 0);
error_set= TRUE;
goto err_rename;);
DBUG_EXECUTE_IF("exchange_partition_abort_3", DBUG_SUICIDE(););
if (file->ha_rename_table(name, tmp_name))
{
- char errbuf[MYSYS_STRERROR_SIZE];
- my_strerror(errbuf, sizeof(errbuf), my_errno);
my_error(ER_ERROR_ON_RENAME, MYF(0), name, tmp_name,
- my_errno, errbuf);
+ my_errno);
error_set= TRUE;
goto err_rename;
}
@@ -392,16 +390,13 @@ static bool exchange_name_with_ddl_log(THD *thd,
/* call rename table from partition to table */
DBUG_EXECUTE_IF("exchange_partition_fail_5",
my_error(ER_ERROR_ON_RENAME, MYF(0),
- from_name, name, 0, "n/a");
+ from_name, name, 0);
error_set= TRUE;
goto err_rename;);
DBUG_EXECUTE_IF("exchange_partition_abort_5", DBUG_SUICIDE(););
if (file->ha_rename_table(from_name, name))
{
- char errbuf[MYSYS_STRERROR_SIZE];
- my_strerror(errbuf, sizeof(errbuf), my_errno);
- my_error(ER_ERROR_ON_RENAME, MYF(0), from_name, name,
- my_errno, errbuf);
+ my_error(ER_ERROR_ON_RENAME, MYF(0), from_name, name, my_errno);
error_set= TRUE;
goto err_rename;
}
@@ -413,16 +408,13 @@ static bool exchange_name_with_ddl_log(THD *thd,
/* call rename table from tmp-nam to partition */
DBUG_EXECUTE_IF("exchange_partition_fail_7",
my_error(ER_ERROR_ON_RENAME, MYF(0),
- tmp_name, from_name, 0, "n/a");
+ tmp_name, from_name, 0);
error_set= TRUE;
goto err_rename;);
DBUG_EXECUTE_IF("exchange_partition_abort_7", DBUG_SUICIDE(););
if (file->ha_rename_table(tmp_name, from_name))
{
- char errbuf[MYSYS_STRERROR_SIZE];
- my_strerror(errbuf, sizeof(errbuf), my_errno);
- my_error(ER_ERROR_ON_RENAME, MYF(0), tmp_name, from_name,
- my_errno, errbuf);
+ my_error(ER_ERROR_ON_RENAME, MYF(0), tmp_name, from_name, my_errno);
error_set= TRUE;
goto err_rename;
}
@@ -491,7 +483,7 @@ bool Sql_cmd_alter_table_exchange_partition::
TABLE_LIST *swap_table_list;
handlerton *table_hton;
partition_element *part_elem;
- char *partition_name;
+ const char *partition_name;
char temp_name[FN_REFLEN+1];
char part_file_name[FN_REFLEN+1];
char swap_file_name[FN_REFLEN+1];
@@ -579,7 +571,7 @@ bool Sql_cmd_alter_table_exchange_partition::
swap_table_list->table_name,
"", 0);
/* create a unique temp name #sqlx-nnnn_nnnn, x for eXchange */
- my_snprintf(temp_name, sizeof(temp_name), "%sx-%lx_%lx",
+ my_snprintf(temp_name, sizeof(temp_name), "%sx-%lx_%llx",
tmp_file_prefix, current_pid, thd->thread_id);
if (lower_case_table_names)
my_casedn_str(files_charset_info, temp_name);
@@ -808,11 +800,11 @@ bool Sql_cmd_alter_table_truncate_partition::execute(THD *thd)
Prune all, but named partitions,
to avoid excessive calls to external_lock().
*/
- List_iterator<char> partition_names_it(alter_info->partition_names);
+ List_iterator<const char> partition_names_it(alter_info->partition_names);
uint num_names= alter_info->partition_names.elements;
for (i= 0; i < num_names; i++)
{
- char *partition_name= partition_names_it++;
+ const char *partition_name= partition_names_it++;
String *str_partition_name= new (thd->mem_root)
String(partition_name, system_charset_info);
if (!str_partition_name)