diff options
Diffstat (limited to 'mysql-test/t/information_schema.test')
-rw-r--r-- | mysql-test/t/information_schema.test | 85 |
1 files changed, 50 insertions, 35 deletions
diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index acb877e1e74..73aea01dfa2 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -80,6 +80,8 @@ connect (user4,localhost,mysqltest_3,,mysqltest); connection user4; select table_name, column_name, privileges from information_schema.columns where table_schema = 'mysqltest' and table_name = 'v1'; +--error 1345 +explain select * from v1; connection default; drop view v1, mysqltest.v1; @@ -580,28 +582,32 @@ connect (con2,localhost,user2,,mysqltest); connect (con3,localhost,user3,,mysqltest); connect (con4,localhost,user4,,); connection con1; -select * from information_schema.column_privileges; -select * from information_schema.table_privileges; -select * from information_schema.schema_privileges; -select * from information_schema.user_privileges; +select * from information_schema.column_privileges order by grantee; +select * from information_schema.table_privileges order by grantee; +select * from information_schema.schema_privileges order by grantee; +select * from information_schema.user_privileges order by grantee; show grants; connection con2; -select * from information_schema.column_privileges; -select * from information_schema.table_privileges; -select * from information_schema.schema_privileges; -select * from information_schema.user_privileges; +select * from information_schema.column_privileges order by grantee; +select * from information_schema.table_privileges order by grantee; +select * from information_schema.schema_privileges order by grantee; +select * from information_schema.user_privileges order by grantee; show grants; connection con3; -select * from information_schema.column_privileges; -select * from information_schema.table_privileges; -select * from information_schema.schema_privileges; -select * from information_schema.user_privileges; +select * from information_schema.column_privileges order by grantee; +select * from information_schema.table_privileges order by grantee; +select * from information_schema.schema_privileges order by grantee; +select * from information_schema.user_privileges order by grantee; show grants; connection con4; -select * from information_schema.column_privileges where grantee like '%user%'; -select * from information_schema.table_privileges where grantee like '%user%'; -select * from information_schema.schema_privileges where grantee like '%user%'; -select * from information_schema.user_privileges where grantee like '%user%'; +select * from information_schema.column_privileges where grantee like '%user%' +order by grantee; +select * from information_schema.table_privileges where grantee like '%user%' +order by grantee; +select * from information_schema.schema_privileges where grantee like '%user%' +order by grantee; +select * from information_schema.user_privileges where grantee like '%user%' +order by grantee; show grants; connection default; drop user user1@localhost, user2@localhost, user3@localhost, user4@localhost; @@ -825,25 +831,6 @@ delete from proc where name=''; use test; # -# End of 5.0 tests. -# -# Show engines -# - -select * from information_schema.engines WHERE ENGINE="MyISAM"; - -# -# INFORMATION_SCHEMA.PROCESSLIST -# - -grant select on *.* to user3148@localhost; -connect (con3148,localhost,user3148,,test); -connection con3148; -select user,db from information_schema.processlist; -connection default; -drop user user3148@localhost; - -# # Bug#16681 information_schema shows forbidden VIEW details # grant select on test.* to mysqltest_1@localhost; @@ -862,3 +849,31 @@ drop view v1, v2; drop table t1; drop user mysqltest_1@localhost; +# +# Bug#19599 duplication of information_schema column value in a CONCAT expr with user var +# +set @a:= '.'; +create table t1(f1 char(5)); +create table t2(f1 char(5)); +select concat(@a, table_name), @a, table_name +from information_schema.tables where table_schema = 'test'; +drop table t1,t2; + +# End of 5.0 tests. +# +# Show engines +# + +select * from information_schema.engines WHERE ENGINE="MyISAM"; + +# +# INFORMATION_SCHEMA.PROCESSLIST +# + +grant select on *.* to user3148@localhost; +connect (con3148,localhost,user3148,,test); +connection con3148; +select user,db from information_schema.processlist; +connection default; +drop user user3148@localhost; + |