diff options
author | unknown <ingo@mysql.com> | 2004-09-24 18:39:25 +0200 |
---|---|---|
committer | unknown <ingo@mysql.com> | 2004-09-24 18:39:25 +0200 |
commit | 697cb7b106d74c047e616f9129129a9eea87ac95 (patch) | |
tree | a7fa518d00c8423d3bb03ef38730994e9cf13df1 /sql/sql_base.cc | |
parent | 0d34c63536031ee2e104ec8cb94e5a1a3dd68ab4 (diff) | |
download | mariadb-git-697cb7b106d74c047e616f9129129a9eea87ac95.tar.gz |
BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
BUG#4335 - one name can be handler open'ed many times.
Reworked the HANDLER functions and interface.
Using a HASH to store information on open tables that
survives FLUSH TABLE.
HANDLER tables alias names must now be unique, though it
is allowed in 4.0 to qualify them with the database name
of the base table.
mysql-test/r/flush_table.result:
BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
BUG#4335 - one name can be handler open'ed many times.
Moved pure handler test results to handler.result.
Added the new test results.
mysql-test/r/handler.result:
BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
BUG#4335 - one name can be handler open'ed many times.
Moved pure handler test results from flush_table.result to here.
mysql-test/t/flush_table.test:
BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
BUG#4335 - one name can be handler open'ed many times.
Moved pure handler tests to handler.test.
Added new tests.
mysql-test/t/handler.test:
BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
BUG#4335 - one name can be handler open'ed many times.
Moved pure handler tests from flush_table.test to here.
sql/mysql_priv.h:
BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
BUG#4335 - one name can be handler open'ed many times.
Reworked the handler interface.
sql/sql_base.cc:
BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
BUG#4335 - one name can be handler open'ed many times.
Replaced mysql_ha_close_list() by the better named
function mysql_ha_flush() with readable options.
sql/sql_class.cc:
BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
BUG#4335 - one name can be handler open'ed many times.
Added initialization for the handler tables hash.
Changed the handler tables clean-up code.
Unreleted to bug: Changed the order of THD initialization
to avoid warning messages on Linux with gcc.
sql/sql_class.h:
BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
BUG#4335 - one name can be handler open'ed many times.
Added the handler tables HASH to THD.
sql/sql_handler.cc:
BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
BUG#4335 - one name can be handler open'ed many times.
Completely reworked the handler functions.
Added an introducing comment, describing the new functionality.
sql/sql_table.cc:
BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
BUG#4335 - one name can be handler open'ed many times.
replaced mysql_ha_close() by the better named
function mysql_ha_flush() with readable options.
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 8fd7273fd78..1ecd606f7d9 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -389,7 +389,7 @@ bool close_cached_tables(THD *thd, bool if_wait_for_refresh, thd->proc_info="Flushing tables"; close_old_data_files(thd,thd->open_tables,1,1); - mysql_ha_close_list(thd, tables); + mysql_ha_flush(thd, tables, MYSQL_HA_REOPEN_ON_USAGE | MYSQL_HA_FLUSH_ALL); bool found=1; /* Wait until all threads has closed all the tables we had locked */ DBUG_PRINT("info", ("Waiting for others threads to close their open tables")); @@ -859,7 +859,7 @@ TABLE *open_table(THD *thd,const char *db,const char *table_name, } /* close handler tables which are marked for flush */ - mysql_ha_close_list(thd, (TABLE_LIST*) NULL, /*flushed*/ 1); + mysql_ha_flush(thd, (TABLE_LIST*) NULL, MYSQL_HA_REOPEN_ON_USAGE); for (table=(TABLE*) hash_search(&open_cache,(byte*) key,key_length) ; table && table->in_use ; @@ -1226,7 +1226,7 @@ bool wait_for_tables(THD *thd) { thd->some_tables_deleted=0; close_old_data_files(thd,thd->open_tables,0,dropping_tables != 0); - mysql_ha_close_list(thd, (TABLE_LIST*) NULL, /*flushed*/ 1); + mysql_ha_flush(thd, (TABLE_LIST*) NULL, MYSQL_HA_REOPEN_ON_USAGE); if (!table_is_used(thd->open_tables,1)) break; (void) pthread_cond_wait(&COND_refresh,&LOCK_open); |