Commit b2e23abc authored by gluh@eagle.(none)'s avatar gluh@eagle.(none)

Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt

into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
parents ac98a45c d380a8fa
......@@ -85,3 +85,8 @@ select 1;
1
unlock tables;
End of 5.0 tests
create database mysql_test;
create table mysql_test.t1(f1 int);
create table mysql_test.`#sql-347f_7` (f1 int);
drop database mysql_test;
End of 5.1 tests
......@@ -122,3 +122,16 @@ 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);
create table mysql_test.`#sql-347f_7` (f1 int);
create table mysql_test.`#sql-347f_8` (f1 int);
drop table mysql_test.`#sql-347f_8`;
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
......@@ -1111,6 +1111,7 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db,
VOID(filename_to_tablename(file->name, table_list->table_name,
strlen(file->name) + 1));
table_list->alias= table_list->table_name; // If lower_case_table_names=2
table_list->internal_tmp_table= is_prefix(file->name, tmp_file_prefix);
/* Link into list */
(*tot_list_next)= table_list;
tot_list_next= &table_list->next_local;
......
......@@ -1663,8 +1663,9 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
}
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,
table->internal_tmp_table ?
FN_IS_TMP : 0);
}
if (drop_temporary ||
(table_type == NULL &&
......
......@@ -1081,6 +1081,7 @@ struct TABLE_LIST
... SELECT implementation).
*/
bool create;
bool internal_tmp_table;
/* View creation context. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment