summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 2985f7e04a0..eccf0e6dbe0 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -560,8 +560,8 @@ int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
HA_CREATE_INFO create_info;
table->file->info(HA_STATUS_AUTO | HA_STATUS_NO_LOCK);
bzero((char*) &create_info,sizeof(create_info));
- create_info.auto_increment_value= table->file->auto_increment_value;
- create_info.table_charset=table->table_charset;
+ create_info.auto_increment_value= table->file->auto_increment_value;
+ create_info.default_table_charset= table->table_charset;
db_type table_type=table->db_type;
strmov(path,table->path);
@@ -605,7 +605,6 @@ int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
}
bzero((char*) &create_info,sizeof(create_info));
- create_info.table_charset=table_list->table->table_charset;
*fn_ext(path)=0; // Remove the .frm extension
error= ha_create_table(path,&create_info,1) ? -1 : 0;