summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRamil Kalimullin <ramil@mysql.com>2010-05-25 22:30:08 +0400
committerRamil Kalimullin <ramil@mysql.com>2010-05-25 22:30:08 +0400
commit442e0f01f294a595dfa3c2c0dcb166b3021414a1 (patch)
tree159b26463fbb897f252f37aabbf9266b5a491a6a /tests
parentbaa8f0127b251227a7eca57cbdd59c96eece2ee5 (diff)
parent422621a43f41e228fbdb39a0d382a412f03e9f24 (diff)
downloadmariadb-git-442e0f01f294a595dfa3c2c0dcb166b3021414a1.tar.gz
Manual merge.
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql_client_test.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 761582a8bb3..43ba2222650 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -18093,6 +18093,43 @@ static void test_bug53371()
}
+static void test_bug53907()
+{
+ int rc;
+ char buf[] = "\x4test\x14../client_test_db/t1";
+
+ myheader("test_bug53907");
+
+ rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1");
+ myquery(rc);
+ rc= mysql_query(mysql, "DROP DATABASE IF EXISTS bug53907");
+ myquery(rc);
+ rc= mysql_query(mysql, "DROP USER 'testbug'@localhost");
+
+ rc= mysql_query(mysql, "CREATE TABLE t1 (a INT)");
+ myquery(rc);
+ rc= mysql_query(mysql, "CREATE DATABASE bug53907");
+ myquery(rc);
+ rc= mysql_query(mysql, "GRANT SELECT ON bug53907.* to 'testbug'@localhost");
+ myquery(rc);
+
+ rc= mysql_change_user(mysql, "testbug", NULL, "bug53907");
+ myquery(rc);
+
+ rc= simple_command(mysql, COM_TABLE_DUMP, buf, sizeof(buf), 0);
+ fprintf(stderr, ">>>>>>>>> %d\n", mysql_errno(mysql));
+ DIE_UNLESS(mysql_errno(mysql) == 1103); /* ER_WRONG_TABLE_NAME */
+
+ rc= mysql_change_user(mysql, opt_user, opt_password, current_db);
+ myquery(rc);
+ rc= mysql_query(mysql, "DROP TABLE t1");
+ myquery(rc);
+ rc= mysql_query(mysql, "DROP DATABASE bug53907");
+ myquery(rc);
+ rc= mysql_query(mysql, "DROP USER 'testbug'@localhost");
+ myquery(rc);
+}
+
/**
Bug#42373: libmysql can mess a connection at connect
@@ -18484,6 +18521,7 @@ static struct my_tests_st my_tests[]= {
{ "test_bug20023", test_bug20023 },
{ "test_bug45010", test_bug45010 },
{ "test_bug53371", test_bug53371 },
+ { "test_bug53907", test_bug53907 },
{ "test_bug31418", test_bug31418 },
{ "test_bug31669", test_bug31669 },
{ "test_bug28386", test_bug28386 },