List:Commits« Previous MessageNext Message »
From:gluh Date:November 23 2007 10:54am
Subject:bk commit into 5.1 tree (gluh:1.2611) BUG#30152
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of gluh. When gluh 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, 2007-11-23 13:54:19+04:00, gluh@stripped +3 -0
  Bug#30152 MySQLD crash duing alter table causes DROP DATABASE to FAIL due to temp file
  disable decoding of table name if the table is internal temporary table

  mysql-test/r/drop.result@stripped, 2007-11-23 13:54:17+04:00, gluh@stripped +4 -0
    test result

  mysql-test/t/drop.test@stripped, 2007-11-23 13:54:17+04:00, gluh@stripped +10 -0
    test case

  sql/sql_table.cc@stripped, 2007-11-23 13:54:17+04:00, gluh@stripped +3 -2
    disable decoding of table name if the table is internal temporary table

diff -Nrup a/mysql-test/r/drop.result b/mysql-test/r/drop.result
--- a/mysql-test/r/drop.result	2006-11-22 00:42:11 +04:00
+++ b/mysql-test/r/drop.result	2007-11-23 13:54:17 +04:00
@@ -85,3 +85,7 @@ select 1;
 1
 unlock tables;
 End of 5.0 tests
+create database mysql_test;
+create table mysql_test.t1(f1 int);
+drop database mysql_test;
+End of 5.1 tests
diff -Nrup a/mysql-test/t/drop.test b/mysql-test/t/drop.test
--- a/mysql-test/t/drop.test	2006-08-21 13:18:56 +05:00
+++ b/mysql-test/t/drop.test	2007-11-23 13:54:17 +04:00
@@ -122,3 +122,13 @@ disconnect addconroot2;
 connection default;
 
 --echo End of 5.0 tests
+
+#
+# Bug#30152 MySQLD crash duing alter table causes DROP DATABASE to FAIL due to temp file
+#
+create database mysql_test;
+create table mysql_test.t1(f1 int);
+copy_file $MYSQLTEST_VARDIR/master-data/mysql_test/t1.frm
$MYSQLTEST_VARDIR/master-data/mysql_test/#sql-347f_6.frm;
+drop database mysql_test;
+
+--echo End of 5.1 tests
diff -Nrup a/sql/sql_table.cc b/sql/sql_table.cc
--- a/sql/sql_table.cc	2007-11-21 21:12:33 +04:00
+++ b/sql/sql_table.cc	2007-11-23 13:54:17 +04:00
@@ -1656,8 +1656,9 @@ int mysql_rm_table_part2(THD *thd, TABLE
       }
       alias= (lower_case_table_names == 2) ? table->alias : table->table_name;
       /* remove .frm file and engine files */
-      path_length= build_table_filename(path, sizeof(path),
-                                        db, alias, reg_ext, 0);
+      path_length= build_table_filename(path, sizeof(path), db, alias, reg_ext,
+                                        is_prefix(alias, tmp_file_prefix) ?
+                                        FN_IS_TMP : 0);
     }
     if (drop_temporary ||
         (table_type == NULL &&        
Thread
bk commit into 5.1 tree (gluh:1.2611) BUG#30152gluh23 Nov