mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Changes for new binary .frm format
Fixes after last merge from 4.0. (Code not yet complete, need anoter merge from 4.0)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user