From 1744d26c956736d2733d81f046bf41859b1504fb Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 23 Mar 2004 17:15:20 +0200 Subject: used right table for grants check (BUG#3270) mysql-test/t/alter_table.test: test for BUG#3270 added --- mysql-test/t/alter_table.test | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'mysql-test/t/alter_table.test') 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; -- cgit v1.2.1 From 143e585a7f5deed19e618cfa7e2987d0949d7ad7 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 25 Mar 2004 21:52:25 +0200 Subject: Improved test case service backport from 4.0 mysql-test/t/alter_table.test: Improved test case sql/nt_servc.cc: service backport from 4.0 BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted --- mysql-test/t/alter_table.test | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mysql-test/t/alter_table.test') diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index ec057c156c8..160495bcba6 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -117,4 +117,6 @@ connection user1; -- error 1142 alter table t1 rename t2; connection root; +revoke all privileges on mysqltest.t1 from mysqltest_1@localhost; +delete from mysql.user where user='mysqltest_1'; drop database mysqltest; -- cgit v1.2.1