summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-06-04 08:23:57 +0300
committerunknown <monty@hundin.mysql.fi>2002-06-04 08:23:57 +0300
commit08526ba32d9f4c353640b928edfdde862efc8596 (patch)
treeab63127fecca420ce57c76f7e3b5903ee4138d91 /sql/sql_delete.cc
parentf0409fa920c7908f2f9ef03919583a32bf84eaad (diff)
downloadmariadb-git-08526ba32d9f4c353640b928edfdde862efc8596.tar.gz
Changes for new binary .frm format
Fixes after last merge from 4.0. (Code not yet complete, need anoter merge from 4.0) heap/hp_write.c: cleanup myisam/ft_boolean_search.c: Fixed tree handling to new format mysql-test/r/alter_table.result: SHOW FULL COLUMN FROM TABLE now returns comment mysql-test/r/func_math.result: Updated results mysql-test/r/heap_btree.result: Portability fix mysql-test/r/isam.result: SHOW FULL COLUMN FROM TABLE now returns comment mysql-test/r/show_check.result: SHOW FULL COLUMN FROM TABLE now returns comment mysql-test/t/heap_btree.test: Portability fix mysql-test/t/show_check.test: SHOW FULL COLUMN FROM TABLE now returns comment sql/field.cc: Fix for comment handling sql/field.h: Added CHARSET_INFO to field structure sql/item_cmpfunc.cc: Fixed like to use system charset (need to be updated) sql/item_func.cc: Update to new charset handling sql/mysql_priv.h: cleanup sql/sql_base.cc: Added charset to HA_CREATE_INFO sql/sql_delete.cc: Added charset to HA_CREATE_INFO sql/sql_parse.cc: Added charset to HA_CREATE_INFO sql/sql_select.cc: cleanup sql/sql_show.cc: charset change sql/sql_string.h: cleanup sql/sql_table.cc: cleanup sql/sql_yacc.yy: Go back to old code for ALTER table ... MODIFY sql/table.cc: fixed comment handling sql/unireg.cc: new field format
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index c8ed74c9bca..48a738f9f6b 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -516,8 +516,9 @@ int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
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;
- db_type table_type=table->db_type;
+ create_info.table_charset=default_charset_info;
+ db_type table_type=table->db_type;
strmov(path,table->path);
*table_ptr= table->next; // Unlink table from list
close_temporary(table,0);
@@ -527,7 +528,8 @@ int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
if ((error= (int) !(open_temporary_table(thd, path, table_list->db,
table_list->real_name, 1))))
(void) rm_temporary_table(table_type, path);
- /* Sasha: if we return here we will not have binloged the truncation and
+ /*
+ If we return here we will not have binloged the truncation and
we will not send_ok() to the client. Yes, we do need better coverage
testing, this bug has been here for a few months :-).
*/
@@ -557,6 +559,8 @@ int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
}
bzero((char*) &create_info,sizeof(create_info));
+ create_info.table_charset=default_charset_info;
+
*fn_ext(path)=0; // Remove the .frm extension
error= ha_create_table(path,&create_info,1) ? -1 : 0;
query_cache_invalidate3(thd, table_list, 0);