summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorunknown <jani@ua141d10.elisa.omakaista.fi>2005-03-22 15:57:24 +0200
committerunknown <jani@ua141d10.elisa.omakaista.fi>2005-03-22 15:57:24 +0200
commit06abeb4f639d8f06901588c4a958cba3eaee3a74 (patch)
treed059977e7bf9355db26e81322219225f4d2e3368 /mysql-test/t
parent523a421725d24ab16b2ba68c16c17b940fc9e226 (diff)
downloadmariadb-git-06abeb4f639d8f06901588c4a958cba3eaee3a74.tar.gz
- Added new error message.
- Changed error message in sql_acl.cc - Added some more tests for GRANT. Docs/mysqld_error.txt: Added new error message. mysql-test/r/grant2.result: Error message changed. mysql-test/r/grant3.result: Clean up. mysql-test/t/grant2.test: Error message changed. sql/share/errmsg.txt: Added new error message. sql/sql_acl.cc: Changed error message. mysql-test/t/grant3.test: Error message changed.
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/grant2.test2
-rw-r--r--mysql-test/t/grant3-master.opt1
-rw-r--r--mysql-test/t/grant3.test32
3 files changed, 34 insertions, 1 deletions
diff --git a/mysql-test/t/grant2.test b/mysql-test/t/grant2.test
index f86cf2a1db7..7aefbb5d9ff 100644
--- a/mysql-test/t/grant2.test
+++ b/mysql-test/t/grant2.test
@@ -179,7 +179,7 @@ show grants for 'mysqltest_1';
drop user 'mysqltest_1', 'mysqltest_3';
#
# Grant must not create user
---error 1211
+--error 1410
grant all on test.t1 to 'mysqltest_1';
--error 1396
drop user 'mysqltest_1';
diff --git a/mysql-test/t/grant3-master.opt b/mysql-test/t/grant3-master.opt
new file mode 100644
index 00000000000..4b11f5902c1
--- /dev/null
+++ b/mysql-test/t/grant3-master.opt
@@ -0,0 +1 @@
+--safe-user-create
diff --git a/mysql-test/t/grant3.test b/mysql-test/t/grant3.test
new file mode 100644
index 00000000000..dca4ff9496e
--- /dev/null
+++ b/mysql-test/t/grant3.test
@@ -0,0 +1,32 @@
+# Test of GRANT commands
+
+SET NAMES binary;
+connect (master,localhost,root,,);
+connection master;
+
+# Cleanup
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+delete from mysql.user where user like 'mysqltest\_%';
+delete from mysql.db where user like 'mysqltest\_%';
+delete from mysql.tables_priv where user like 'mysqltest\_%';
+delete from mysql.columns_priv where user like 'mysqltest\_%';
+flush privileges;
+
+create user mysqltest_1@localhost;
+grant grant option on mysql.* to mysqltest_1@localhost;
+grant select on `my\_1`.* to mysqltest_1@localhost with grant option;
+connect (user_a,localhost,mysqltest_1,,);
+connection user_a;
+--error 1410
+grant select on `my\_1`.* to mysqltest_2@localhost;
+disconnect user_a;
+connection default;
+
+delete from mysql.user where user like 'mysqltest\_%';
+delete from mysql.db where user like 'mysqltest\_%';
+delete from mysql.tables_priv where user like 'mysqltest\_%';
+delete from mysql.columns_priv where user like 'mysqltest\_%';
+flush privileges;