summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authormonty@donna.mysql.fi <>2001-03-06 20:38:53 +0200
committermonty@donna.mysql.fi <>2001-03-06 20:38:53 +0200
commite829e96dbc87321f91b305c8017673a655d1a2cd (patch)
tree9613587a263dc7a069c1038873e71db018c29273 /sql/sql_table.cc
parentf1b9242dc8b3cd52ba0045bddd1eb83e4c01eac4 (diff)
downloadmariadb-git-e829e96dbc87321f91b305c8017673a655d1a2cd.tar.gz
Patch from sleepycat to fix problem with BDB and log files
Print full command name to log files Convert table type to supported onces on ALTER TABLE
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index ce054353cc5..4d6a2e79fc3 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -747,6 +747,7 @@ bool close_cached_table(THD *thd,TABLE *table)
DBUG_ENTER("close_cached_table");
if (table)
{
+ DBUG_PRINT("enter",("table: %s", table->table_name));
VOID(table->file->extra(HA_EXTRA_FORCE_REOPEN)); // Close all data files
/* Mark all tables that are in use as 'old' */
mysql_lock_abort(thd,table); // end threads waiting on lock
@@ -1139,9 +1140,9 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
old_db_type=table->db_type;
if (create_info->db_type == DB_TYPE_DEFAULT)
create_info->db_type=old_db_type;
+ new_db_type=create_info->db_type= ha_checktype(create_info->db_type);
if (create_info->row_type == ROW_TYPE_DEFAULT)
create_info->row_type=table->row_type;
- new_db_type=create_info->db_type;
/* Check if the user only wants to do a simple RENAME */
@@ -1518,6 +1519,8 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
goto err;
}
table=0; // Marker for win32 version
+#else
+ table->file->extra(HA_EXTRA_FORCE_REOPEN); // Don't use this file anymore
#endif
error=0;