List:Commits« Previous MessageNext Message »
From:Petr Chardin Date:December 7 2006 1:45pm
Subject:bk commit into 5.1 tree (petr:1.2373) BUG#23044
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of cps. When cps does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-12-07 16:45:45+03:00, petr@stripped +3 -0
  Fix Bug #23044 Warnings on flush of a log table

  mysql-test/r/log_tables.result@stripped, 2006-12-07 16:45:42+03:00, petr@stripped +1 -0
    update result file

  mysql-test/t/log_tables.test@stripped, 2006-12-07 16:45:42+03:00, petr@stripped +10 -0
    add a test for the bug

  sql/sql_base.cc@stripped, 2006-12-07 16:45:42+03:00, petr@stripped +3 -1
    Perform full check for log tables in close_cached_tables().
    It turned out that for FLUSH TABLE table->table is not yet
    linked to the table share, so we cannot rely on checking
    table->table->s->log_table flag

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	petr
# Host:	outpost.site
# Root:	/home/cps/mysql/trees/5.1-runtime-19044

--- 1.365/sql/sql_base.cc	2006-12-01 12:39:44 +03:00
+++ 1.366/sql/sql_base.cc	2006-12-07 16:45:42 +03:00
@@ -848,7 +848,9 @@
     bool found=0;
     for (TABLE_LIST *table= tables; table; table= table->next_local)
     {
-      if ((!table->table || !table->table->s->log_table) &&
+      /* don't close log tables */
+      if (!check_if_log_table(table->db_length, table->db,
+                         table->table_name_length, table->table_name, 1) &&
           remove_table_from_cache(thd, table->db, table->table_name,
                                   RTFC_OWNED_BY_THD_FLAG))
 	found=1;

--- 1.15/mysql-test/r/log_tables.result	2006-12-04 03:07:42 +03:00
+++ 1.16/mysql-test/r/log_tables.result	2006-12-07 16:45:42 +03:00
@@ -284,3 +284,4 @@
 slow_log_new
 drop table slow_log_new, general_log_new;
 use test;
+flush table mysql.general_log;

--- 1.14/mysql-test/t/log_tables.test	2006-10-24 16:55:21 +04:00
+++ 1.15/mysql-test/t/log_tables.test	2006-12-07 16:45:42 +03:00
@@ -397,6 +397,16 @@
 drop table slow_log_new, general_log_new;
 use test;
 
+#
+# Bug #23044 Warnings on flush of a log table
+#
+
+#
+# There should be no warnings, as log tables are skipped during
+# FLUSH TABLE. log tables are flushed only on FLUSH LOGS;
+#
+flush table mysql.general_log;
+
 # kill all connections
 disconnect con1;
 disconnect con2;
Thread
bk commit into 5.1 tree (petr:1.2373) BUG#23044Petr Chardin7 Dec