diff options
author | unknown <monty@tik.mysql.fi> | 2002-03-21 23:06:48 +0200 |
---|---|---|
committer | unknown <monty@tik.mysql.fi> | 2002-03-21 23:06:48 +0200 |
commit | c0a5e4707168e03e89191261b7a5ec95ffbc99d7 (patch) | |
tree | 63e54a056bcd09390054202f9c5fad2985ab8f2d /sql | |
parent | b70f53b28940008233995d885584c2e0984e3bf4 (diff) | |
download | mariadb-git-c0a5e4707168e03e89191261b7a5ec95ffbc99d7.tar.gz |
Quote names to SHOW CREATE for mysqldump
Fix thread-related bug when doing DROP TABLE
Fix bug in RENAME TABLE on windows
Docs/manual.texi:
Changelog
client/mysqldump.c:
Quote names to SHOW CREATE
mysql-test/t/range.test:
Test case for range bug
sql/lock.cc:
Fix thread-related bug when doing DROP TABLE
sql/sql_base.cc:
Fix thread-related bug when doing DROP TABLE
sql/sql_rename.cc:
Fix bug in RENAME TABLE on windows
Diffstat (limited to 'sql')
-rw-r--r-- | sql/lock.cc | 7 | ||||
-rw-r--r-- | sql/sql_base.cc | 1 | ||||
-rw-r--r-- | sql/sql_rename.cc | 10 |
3 files changed, 13 insertions, 5 deletions
diff --git a/sql/lock.cc b/sql/lock.cc index aa06822e03f..a9054b99186 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -108,6 +108,13 @@ MYSQL_LOCK *mysql_lock_tables(THD *thd,TABLE **tables,uint count) thd->locked=0; break; } + else if (!thd->open_tables) + { + // Only using temporary tables, no need to unlock + thd->some_tables_deleted=0; + thd->locked=0; + break; + } /* some table was altered or deleted. reopen tables marked deleted */ mysql_unlock_tables(thd,sql_lock); diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 656758623bc..985118ee218 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -464,6 +464,7 @@ void close_thread_tables(THD *thd, bool locked) unused_tables=table->next=table->prev=table; } } + thd->some_tables_deleted=0; thd->open_tables=0; /* Free tables to hold down open files */ while (open_cache.records > table_cache_size && unused_tables) diff --git a/sql/sql_rename.cc b/sql/sql_rename.cc index 0f6e2f9fbf3..a6614f3f3f6 100644 --- a/sql/sql_rename.cc +++ b/sql/sql_rename.cc @@ -129,7 +129,7 @@ rename_tables(THD *thd, TABLE_LIST *table_list, bool skip_error) new_table=ren_table->next; sprintf(name,"%s/%s/%s%s",mysql_data_home, - new_table->db,new_table->name, + new_table->db,new_table->real_name, reg_ext); if (!access(name,F_OK)) { @@ -137,7 +137,7 @@ rename_tables(THD *thd, TABLE_LIST *table_list, bool skip_error) return ren_table; // This can't be skipped } sprintf(name,"%s/%s/%s%s",mysql_data_home, - ren_table->db,ren_table->name, + ren_table->db,ren_table->real_name, reg_ext); if ((table_type=get_table_type(name)) == DB_TYPE_UNKNOWN) { @@ -146,11 +146,11 @@ rename_tables(THD *thd, TABLE_LIST *table_list, bool skip_error) return ren_table; } else if (mysql_rename_table(table_type, - ren_table->db, ren_table->name, - new_table->db, new_table->name)) + ren_table->db, ren_table->real_name, + new_table->db, new_table->real_name)) { if (!skip_error) - return ren_table; + DBUG_RETURN(ren_table); } } DBUG_RETURN(0); |