summaryrefslogtreecommitdiff
path: root/mysql-test/t/alter_table.test
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2004-03-23 17:15:20 +0200
committerunknown <bell@sanja.is.com.ua>2004-03-23 17:15:20 +0200
commit1744d26c956736d2733d81f046bf41859b1504fb (patch)
tree1946d8e2d2397669d743d078d238bafa0486adb5 /mysql-test/t/alter_table.test
parentbc9de3d4552f2294bad973d0b9fbe07de3d07c1d (diff)
downloadmariadb-git-1744d26c956736d2733d81f046bf41859b1504fb.tar.gz
used right table for grants check (BUG#3270)
mysql-test/t/alter_table.test: test for BUG#3270 added
Diffstat (limited to 'mysql-test/t/alter_table.test')
-rw-r--r--mysql-test/t/alter_table.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test
index cfb4f958372..ec057c156c8 100644
--- a/mysql-test/t/alter_table.test
+++ b/mysql-test/t/alter_table.test
@@ -3,6 +3,8 @@
#
drop table if exists t1;
+drop database if exists mysqltest;
+
create table t1 (
col1 int not null auto_increment primary key,
col2 varchar(30) not null,
@@ -99,3 +101,20 @@ select * from t1;
select * from mysqltest.t1;
drop table t1;
drop database mysqltest;
+
+#
+# Rights for renaming test (Bug #3270)
+#
+connect (root,localhost,root,,test,0,mysql-master.sock);
+connection root;
+--disable_warnings
+create database mysqltest;
+--enable_warnings
+create table mysqltest.t1 (a int,b int,c int);
+grant all on mysqltest.t1 to mysqltest_1@localhost;
+connect (user1,localhost,mysqltest_1,,mysqltest,0,mysql-master.sock);
+connection user1;
+-- error 1142
+alter table t1 rename t2;
+connection root;
+drop database mysqltest;