diff options
author | unknown <kroki/tomash@moonlight.intranet> | 2006-08-09 16:42:21 +0400 |
---|---|---|
committer | unknown <kroki/tomash@moonlight.intranet> | 2006-08-09 16:42:21 +0400 |
commit | 29701579b346a981faa10fa01b2c666a03457a94 (patch) | |
tree | e1f9ee333d4a933e70d6926c6d69f4d035a4ba9a /sql/sql_base.cc | |
parent | 5f34962adbbcc82b7e8390e07e8417b0b0ce9666 (diff) | |
parent | 9de602d2c1d3fa23881b81c26d61c9ae73896da1 (diff) | |
download | mariadb-git-29701579b346a981faa10fa01b2c666a03457a94.tar.gz |
Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-merge
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-rt-merge
sql/handler.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/share/errmsg.txt:
Auto merged
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index e40b9721911..dbe7f5b5083 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1997,17 +1997,17 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root, table= (TABLE*) hash_next(&open_cache, (byte*) key, key_length, &state)) { - if (table->s->version != refresh_version) + /* + Here we flush tables marked for flush. However we never flush log + tables here. They are flushed only on FLUSH LOGS. + */ + if (table->s->version != refresh_version && !table->s->log_table) { DBUG_PRINT("note", ("Found table '%s.%s' with different refresh version", table_list->db, table_list->table_name)); - /* - Don't close tables if we are working with a log table or were - asked not to close the table explicitly - */ - if (flags & MYSQL_LOCK_IGNORE_FLUSH || table->s->log_table) + if (flags & MYSQL_LOCK_IGNORE_FLUSH) { /* Force close at once after usage */ thd->version= table->s->version; @@ -2346,7 +2346,11 @@ void close_old_data_files(THD *thd, TABLE *table, bool abort_locks, for (; table ; table=table->next) { - if (table->s->version != refresh_version) + /* + Reopen marked for flush. But close log tables. They are flushed only + explicitly on FLUSH LOGS + */ + if (table->s->version != refresh_version && !table->s->log_table) { found=1; if (table->db_stat) |