summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorunknown <ingo@mysql.com>2005-11-15 18:09:40 +0100
committerunknown <ingo@mysql.com>2005-11-15 18:09:40 +0100
commitfaaf53d9668dcfa7b2732a0c8dccd83827a061b9 (patch)
treeda120a595ab6bb6ad5f661ed7c3f1a79dd8cbf63 /sql/sql_table.cc
parent675226728c40b2b9c477b7628a867292b243351d (diff)
parent15062e97e9f90cea52fd220d2fc5ec76faeb1748 (diff)
downloadmariadb-git-faaf53d9668dcfa7b2732a0c8dccd83827a061b9.tar.gz
Merge mysql.com:/home/mydev/mysql-4.0-4000
into mysql.com:/home/mydev/mysql-4.1-4100 mysql-test/r/handler.result: Auto merged sql/mysql_priv.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.cc: Auto merged mysql-test/t/handler.test: Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash Manual merge. sql/sql_handler.cc: Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash Manual merge. sql/sql_table.cc: Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash Manual merge.
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index d6a7d76ac99..0e0a05ea099 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -220,7 +220,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
for (table=tables ; table ; table=table->next)
{
char *db=table->db;
- mysql_ha_flush(thd, table, MYSQL_HA_CLOSE_FINAL);
+ mysql_ha_flush(thd, table, MYSQL_HA_CLOSE_FINAL, TRUE);
if (!close_temporary_table(thd, db, table->real_name))
{
tmp_table_deleted=1;
@@ -1928,7 +1928,7 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
if (protocol->send_fields(&field_list, 1))
DBUG_RETURN(-1);
- mysql_ha_flush(thd, tables, MYSQL_HA_CLOSE_FINAL);
+ mysql_ha_flush(thd, tables, MYSQL_HA_CLOSE_FINAL, FALSE);
for (table = tables; table; table = table->next)
{
char table_name[NAME_LEN*2+2];
@@ -2780,8 +2780,9 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
if (!new_db || !my_strcasecmp(table_alias_charset, new_db, db))
new_db= db;
used_fields=create_info->used_fields;
+
+ mysql_ha_flush(thd, table_list, MYSQL_HA_CLOSE_FINAL, FALSE);
- mysql_ha_flush(thd, table_list, MYSQL_HA_CLOSE_FINAL);
/* DISCARD/IMPORT TABLESPACE is always alone in an ALTER TABLE */
if (alter_info->tablespace_op != NO_TABLESPACE_OP)
DBUG_RETURN(mysql_discard_or_import_tablespace(thd,table_list,