diff options
author | Alexander Nozdrin <alik@ibmvm> | 2009-10-07 20:39:57 +0400 |
---|---|---|
committer | Alexander Nozdrin <alik@ibmvm> | 2009-10-07 20:39:57 +0400 |
commit | 9384835087d71b77ef1ee0f197704060c713af2c (patch) | |
tree | 36172354a44f415d1a716da83486600d055b7305 /mysql-test/r/drop-no_root.result | |
parent | 1733a974b4811f439806d5b6cfc388462b9bd675 (diff) | |
download | mariadb-git-9384835087d71b77ef1ee0f197704060c713af2c.tar.gz |
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.
Diffstat (limited to 'mysql-test/r/drop-no_root.result')
-rw-r--r-- | mysql-test/r/drop-no_root.result | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/r/drop-no_root.result b/mysql-test/r/drop-no_root.result new file mode 100644 index 00000000000..d74ce47dedd --- /dev/null +++ b/mysql-test/r/drop-no_root.result @@ -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. |