Below is the list of changes that have just been committed into a local
5.1 repository of bar. When bar 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
1.2161 06/05/18 12:21:13 bar@stripped +3 -0
Bug#19392 Rename Database: Crash if case change
Problem:
Renaming a database to itself crashed server.
It hapenned because of wrong DBUG_ASSERT.
Fix: removing wrong DBUG_ASSERT. Now it reports
a correct error message "database alreadt exists".
sql/sql_db.cc
1.134 06/05/18 12:20:37 bar@stripped +3 -3
DBUG_ASSERT crashed server when renaming a database to itself.
mysql-test/t/renamedb.test
1.2 06/05/18 12:20:37 bar@stripped +8 -0
Adding test case
mysql-test/r/renamedb.result
1.2 06/05/18 12:20:37 bar@stripped +4 -0
Adding test case
# 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: bar
# Host: bar.intranet.mysql.r18.ru
# Root: /usr/home/bar/mysql-5.1-new.19392
--- 1.133/sql/sql_db.cc 2006-03-02 19:24:57 +04:00
+++ 1.134/sql/sql_db.cc 2006-05-18 12:20:37 +05:00
@@ -134,9 +134,9 @@ void lock_db_delete(const char *name, ui
{
my_dblock_t *opt;
safe_mutex_assert_owner(&LOCK_lock_db);
- opt= (my_dblock_t *)hash_search(&lock_db_cache, (const byte*) name, length);
- DBUG_ASSERT(opt != NULL);
- hash_delete(&lock_db_cache, (byte*) opt);
+ if (opt= (my_dblock_t *)hash_search(&lock_db_cache,
+ (const byte*) name, length))
+ hash_delete(&lock_db_cache, (byte*) opt);
}
--- 1.1/mysql-test/r/renamedb.result 2006-02-13 11:48:38 +04:00
+++ 1.2/mysql-test/r/renamedb.result 2006-05-18 12:20:37 +05:00
@@ -27,3 +27,7 @@ a
2
3
drop database testdb2;
+create database testdb1;
+rename database testdb1 to testdb1;
+ERROR HY000: Can't create database 'testdb1'; database exists
+drop database testdb1;
--- 1.1/mysql-test/t/renamedb.test 2006-02-13 11:48:38 +04:00
+++ 1.2/mysql-test/t/renamedb.test 2006-05-18 12:20:37 +05:00
@@ -16,3 +16,11 @@ select database();
show tables;
select a from t1 order by a;
drop database testdb2;
+
+#
+# Bug#19392 Rename Database: Crash if case change
+#
+create database testdb1;
+--error 1007
+rename database testdb1 to testdb1;
+drop database testdb1;
| Thread |
|---|
| • bk commit into 5.1 tree (bar:1.2161) BUG#19392 | bar | 18 May |