summaryrefslogtreecommitdiff
path: root/mysql-test/t/grant2.test
diff options
context:
space:
mode:
authorunknown <serg@sergbook.mysql.com>2004-12-31 11:52:14 +0100
committerunknown <serg@sergbook.mysql.com>2004-12-31 11:52:14 +0100
commit5eaf65ab4be77911eb03cceefac9ecea48c25f71 (patch)
treee4e588771f15003e0c2b5df5cbc1cafeb3530324 /mysql-test/t/grant2.test
parent379613c3e274147f240a25b10eb677e3ee77aa34 (diff)
downloadmariadb-git-5eaf65ab4be77911eb03cceefac9ecea48c25f71.tar.gz
post-merge
mysql-test/r/grant2.result: new test case mysql-test/r/variables.result: don't fail w/o innodb mysql-test/t/grant2.test: new test case mysql-test/t/multi_update.test: don't fail w/o innodb mysql-test/t/variables.test: don't fail w/o innodb sql/sql_acl.cc: cleanup
Diffstat (limited to 'mysql-test/t/grant2.test')
-rw-r--r--mysql-test/t/grant2.test28
1 files changed, 24 insertions, 4 deletions
diff --git a/mysql-test/t/grant2.test b/mysql-test/t/grant2.test
index f86be0c95b9..7060d35e9a4 100644
--- a/mysql-test/t/grant2.test
+++ b/mysql-test/t/grant2.test
@@ -50,10 +50,9 @@ flush privileges;
use mysqltest;
create table t1 (id int primary key, data varchar(255));
-connect (mrbad, localhost, mysqltest_1,,);
+connect (mrbad, localhost, mysqltest_1,,mysqltest);
connection mrbad;
show grants for current_user();
-use mysqltest;
insert into t1 values (1, 'I can''t change it!');
--error 1044
update t1 set data='I can change it!' where id = 1;
@@ -61,11 +60,32 @@ update t1 set data='I can change it!' where id = 1;
--error 1044
insert into t1 values (1, 'XXX') on duplicate key update data= 'I can change it!';
select * from t1;
+disconnect mrbad;
+
+connection default;
+drop table t1;
+delete from mysql.user where user like 'mysqltest\_%';
+delete from mysql.db where user like 'mysqltest\_%';
+flush privileges;
+
+create table t1 (a int, b int);
+grant select (a) on t1 to mysqltest_1@localhost with grant option;
+connect (mrugly, localhost, mysqltest_1,,mysqltest);
+connection mrugly;
+--error 1143
+grant select (a,b) on t1 to mysqltest_2@localhost;
+--error 1142
+grant select on t1 to mysqltest_3@localhost;
+disconnect mrugly;
connection default;
drop table t1;
-drop database mysqltest;
-use test;
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;
+
+drop database mysqltest;
+use test;
+