Commit 4f7a0857 authored by unknown's avatar unknown

Re-enable alter_table test for embedded server by moving grant-related test

to grant.test and using replace_column to neuter the Privileges column in
SHOW FULL COLUMNS.


BitKeeper/deleted/.del-alter_table.result.es~a1077916d429e443:
  Delete: mysql-test/r/alter_table.result.es
mysql-test/t/alter_table.test:
  Add replace_column for grant-related column
  Move grant-related test to grant.test
mysql-test/r/alter_table.result:
  Update results
mysql-test/t/grant.test:
  Move grant-related test from alter_table.test
mysql-test/r/grant.result:
  Add test results
mysql-test/mysql-test-run.sh:
  Don't skip alter_table test for embedded server
parent 425f2f91
......@@ -1506,7 +1506,6 @@ run_testcase ()
# script soon anyway so it is not worth it spending the time
if [ "x$USE_EMBEDDED_SERVER" = "x1" -a -z "$DO_TEST" ] ; then
for t in \
"alter_table" \
"bdb-deadlock" \
"connect" \
"ctype_latin1_de" \
......
......@@ -52,9 +52,9 @@ KEY NAME (NAME));
ALTER TABLE t1 CHANGE NAME NAME CHAR(80) not null;
SHOW FULL COLUMNS FROM t1;
Field Type Collation Null Key Default Extra Privileges Comment
GROUP_ID int(10) unsigned NULL PRI 0 select,insert,update,references
LANG_ID smallint(5) unsigned NULL PRI 0 select,insert,update,references
NAME char(80) latin1_swedish_ci MUL select,insert,update,references
GROUP_ID int(10) unsigned NULL PRI 0 #
LANG_ID smallint(5) unsigned NULL PRI 0 #
NAME char(80) latin1_swedish_ci MUL #
DROP TABLE t1;
create table t1 (n int);
insert into t1 values(9),(3),(12),(10);
......@@ -117,14 +117,6 @@ name
mysqltest
drop table t1;
drop database mysqltest;
create database mysqltest;
create table mysqltest.t1 (a int,b int,c int);
grant all on mysqltest.t1 to mysqltest_1@localhost;
alter table t1 rename t2;
ERROR 42000: INSERT,CREATE command denied to user 'mysqltest_1'@'localhost' for table 't2'
revoke all privileges on mysqltest.t1 from mysqltest_1@localhost;
delete from mysql.user where user=_binary'mysqltest_1';
drop database mysqltest;
create table t1 (n1 int not null, n2 int, n3 int, n4 float,
unique(n1),
key (n1, n2, n3, n4),
......
This diff is collapsed.
......@@ -427,3 +427,11 @@ delete from mysql.columns_priv where user="mysqltest_3";
flush privileges;
drop database mysqltest_1;
drop database mysqltest_2;
create database mysqltest;
create table mysqltest.t1 (a int,b int,c int);
grant all on mysqltest.t1 to mysqltest_1@localhost;
alter table t1 rename t2;
ERROR 42000: INSERT,CREATE command denied to user 'mysqltest_1'@'localhost' for table 't2'
revoke all privileges on mysqltest.t1 from mysqltest_1@localhost;
delete from mysql.user where user=_binary'mysqltest_1';
drop database mysqltest;
......@@ -41,6 +41,7 @@ PRIMARY KEY (GROUP_ID,LANG_ID),
KEY NAME (NAME));
#show table status like "t1";
ALTER TABLE t1 CHANGE NAME NAME CHAR(80) not null;
--replace_column 8 #
SHOW FULL COLUMNS FROM t1;
DROP TABLE t1;
......@@ -107,25 +108,6 @@ select * from mysqltest.t1;
drop table t1;
drop database mysqltest;
#
# Rights for renaming test (Bug #3270)
#
connect (root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
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,$MASTER_MYPORT,$MASTER_MYSOCK);
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=_binary'mysqltest_1';
drop database mysqltest;
#
# ALTER TABLE ... ENABLE/DISABLE KEYS
......
......@@ -369,3 +369,23 @@ delete from mysql.columns_priv where user="mysqltest_3";
flush privileges;
drop database mysqltest_1;
drop database mysqltest_2;
#
# Rights for renaming test (Bug #3270)
#
connect (root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
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,$MASTER_MYPORT,$MASTER_MYSOCK);
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=_binary'mysqltest_1';
drop database mysqltest;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment