List:Commits« Previous MessageNext Message »
From:Sergey Vojtovich Date:October 11 2006 5:34pm
Subject:bk commit into 4.1 tree (svoj:1.2529) BUG#22562
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of svoj. When svoj 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-10-11 20:34:20+05:00, svoj@stripped +3 -0
  BUG#22562 - REPAIR TABLE .. USE_FRM causes server crash on Windows and server
              hangs on Linux
  
  If REPAIR TABLE ... USE_FRM is issued for table that is located in different
  than default database server crash could happen.
  
  In reopen_name_locked_table take database name from table_list (user specified
  or default database) instead of from thd (default database).
  
  Affects 4.1 only.

  mysql-test/r/repair.result@stripped, 2006-10-11 20:34:19+05:00, svoj@stripped +7 -0
    A test case for BUG#22562.

  mysql-test/t/repair.test@stripped, 2006-10-11 20:34:19+05:00, svoj@stripped +10 -0
    A test case for BUG#22562.

  sql/sql_base.cc@stripped, 2006-10-11 20:34:19+05:00, svoj@stripped +1 -1
    In reopen_name_locked_table take database name from table_list (user specified
    or default database) instead of from thd (default database).

# 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:	svoj
# Host:	april.(none)
# Root:	/home/svoj/devel/mysql/BUG22562/mysql-4.1-engines

--- 1.272/sql/sql_base.cc	2006-10-11 20:34:24 +05:00
+++ 1.273/sql/sql_base.cc	2006-10-11 20:34:24 +05:00
@@ -821,7 +821,7 @@ TABLE *reopen_name_locked_table(THD* thd
   if (!(table = table_list->table))
     DBUG_RETURN(0);
 
-  char* db = thd->db ? thd->db : table_list->db;
+  char *db= table_list->db;
   char* table_name = table_list->real_name;
   char	key[MAX_DBKEY_LENGTH];
   uint	key_length;

--- 1.18/mysql-test/r/repair.result	2006-10-11 20:34:24 +05:00
+++ 1.19/mysql-test/r/repair.result	2006-10-11 20:34:24 +05:00
@@ -48,3 +48,10 @@ Table	Non_unique	Key_name	Seq_in_index	C
 t1	1	a	1	a	A	5	NULL	NULL	YES	BTREE	
 SET myisam_repair_threads=@@global.myisam_repair_threads;
 DROP TABLE t1;
+CREATE TABLE t1(a INT);
+USE mysql;
+REPAIR TABLE test.t1 USE_FRM;
+Table	Op	Msg_type	Msg_text
+test.t1	repair	status	OK
+USE test;
+DROP TABLE t1;

--- 1.15/mysql-test/t/repair.test	2006-10-11 20:34:24 +05:00
+++ 1.16/mysql-test/t/repair.test	2006-10-11 20:34:24 +05:00
@@ -45,4 +45,14 @@ SHOW INDEX FROM t1;
 SET myisam_repair_threads=@@global.myisam_repair_threads;
 DROP TABLE t1;
 
+#
+# BUG#22562 - REPAIR TABLE .. USE_FRM causes server crash on Windows and
+#             server hangs on Linux
+#
+CREATE TABLE t1(a INT);
+USE mysql;
+REPAIR TABLE test.t1 USE_FRM;
+USE test;
+DROP TABLE t1;
+
 # End of 4.1 tests
Thread
bk commit into 4.1 tree (svoj:1.2529) BUG#22562Sergey Vojtovich11 Oct