mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
A backport of patch for Bug#26704.
Original revision is from mysql-6.0-codebase: revno: 2630.3.1 committer: Alexander Nozdrin <alik@mysql.com> branch nick: 6.0-rt-bug26704 timestamp: Thu 2008-05-29 21:04:06 +0400 message: A fix for Bug#26704: Failing DROP DATABASE brings mysql-client out of sync. The problem was that we changed current database w/o caring whether it was dropped successfully or not. The fix is not to change current database if we failed to drop it.
This commit is contained in:
27
mysql-test/r/drop-no_root.result
Normal file
27
mysql-test/r/drop-no_root.result
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
# --
|
||||
# -- Bug#26704: Failing DROP DATABASE brings mysql-client out of sync.
|
||||
# --
|
||||
|
||||
DROP DATABASE IF EXISTS mysql_test;
|
||||
|
||||
CREATE DATABASE mysql_test;
|
||||
CREATE TABLE mysql_test.t1(c INT);
|
||||
use mysql_test;
|
||||
|
||||
chmod 000 mysql_test/t1.frm
|
||||
|
||||
DROP DATABASE mysql_test;
|
||||
ERROR HY000: Error dropping database (can't rmdir './mysql_test', errno: 39)
|
||||
|
||||
SELECT DATABASE();
|
||||
DATABASE()
|
||||
mysql_test
|
||||
|
||||
rm mysql_test/t1.MYD mysql_test/t1.MYI
|
||||
|
||||
DROP DATABASE mysql_test;
|
||||
|
||||
use test;
|
||||
|
||||
# -- End of Bug#26704.
|
Reference in New Issue
Block a user