1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

manually merged

BitKeeper/etc/logging_ok:
  auto-union
mysql-test/r/binary.result:
  Auto merged
mysql-test/r/truncate.result:
  Auto merged
mysql-test/t/binary.test:
  Auto merged
mysql-test/t/truncate.test:
  Auto merged
mysys/my_lib.c:
  Auto merged
strings/my_vsnprintf.c:
  Auto merged
support-files/Makefile.am:
  Auto merged
This commit is contained in:
unknown
2004-08-24 17:24:23 +02:00
12 changed files with 102 additions and 26 deletions

View File

@@ -607,17 +607,13 @@ int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
int error;
DBUG_ENTER("mysql_truncate");
bzero((char*) &create_info,sizeof(create_info));
/* If it is a temporary table, close and regenerate it */
if (!dont_send_ok && (table_ptr=find_temporary_table(thd,table_list->db,
table_list->real_name)))
{
TABLE *table= *table_ptr;
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.default_table_charset= table->table_charset;
db_type table_type=table->db_type;
strmov(path,table->path);
*table_ptr= table->next; // Unlink table from list
@@ -659,8 +655,6 @@ int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
DBUG_RETURN(-1);
}
bzero((char*) &create_info,sizeof(create_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);