From 57e7bc551300b224404b3ce1a5498917f9ead689 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 6 Jun 2006 12:57:50 +0500 Subject: [PATCH] Bug#18035 Information Schema: Output is not Sorted added 'order by' to avoid result order difference --- mysql-test/r/information_schema.result | 36 ++++++++++++++------------ mysql-test/t/information_schema.test | 36 ++++++++++++++------------ 2 files changed, 40 insertions(+), 32 deletions(-) diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index b80abc7d2d3..6da07922251 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -866,58 +866,62 @@ grant select (f1) on mysqltest.t1 to user1@localhost; grant select on mysqltest.t2 to user2@localhost; grant select on mysqltest.* to user3@localhost; grant select on *.* to user4@localhost; -select * from information_schema.column_privileges; +select * from information_schema.column_privileges order by grantee; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE 'user1'@'localhost' NULL mysqltest t1 f1 SELECT NO -select * from information_schema.table_privileges; +select * from information_schema.table_privileges order by grantee; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * from information_schema.schema_privileges; +select * from information_schema.schema_privileges order by grantee; GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -select * from information_schema.user_privileges; +select * from information_schema.user_privileges order by grantee; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE 'user1'@'localhost' NULL USAGE NO show grants; Grants for user1@localhost GRANT USAGE ON *.* TO 'user1'@'localhost' GRANT SELECT (f1) ON `mysqltest`.`t1` TO 'user1'@'localhost' -select * from information_schema.column_privileges; +select * from information_schema.column_privileges order by grantee; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * from information_schema.table_privileges; +select * from information_schema.table_privileges order by grantee; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE 'user2'@'localhost' NULL mysqltest t2 SELECT NO -select * from information_schema.schema_privileges; +select * from information_schema.schema_privileges order by grantee; GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -select * from information_schema.user_privileges; +select * from information_schema.user_privileges order by grantee; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE 'user2'@'localhost' NULL USAGE NO show grants; Grants for user2@localhost GRANT USAGE ON *.* TO 'user2'@'localhost' GRANT SELECT ON `mysqltest`.`t2` TO 'user2'@'localhost' -select * from information_schema.column_privileges; +select * from information_schema.column_privileges order by grantee; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * from information_schema.table_privileges; +select * from information_schema.table_privileges order by grantee; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * from information_schema.schema_privileges; +select * from information_schema.schema_privileges order by grantee; GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE 'user3'@'localhost' NULL mysqltest SELECT NO -select * from information_schema.user_privileges; +select * from information_schema.user_privileges order by grantee; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE 'user3'@'localhost' NULL USAGE NO show grants; Grants for user3@localhost GRANT USAGE ON *.* TO 'user3'@'localhost' GRANT SELECT ON `mysqltest`.* TO 'user3'@'localhost' -select * from information_schema.column_privileges where grantee like '%user%'; +select * from information_schema.column_privileges where grantee like '%user%' +order by grantee; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE 'user1'@'localhost' NULL mysqltest t1 f1 SELECT NO -select * from information_schema.table_privileges where grantee like '%user%'; +select * from information_schema.table_privileges where grantee like '%user%' +order by grantee; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE 'user2'@'localhost' NULL mysqltest t2 SELECT NO -select * from information_schema.schema_privileges where grantee like '%user%'; +select * from information_schema.schema_privileges where grantee like '%user%' +order by grantee; GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE 'user3'@'localhost' NULL mysqltest SELECT NO -select * from information_schema.user_privileges where grantee like '%user%'; +select * from information_schema.user_privileges where grantee like '%user%' +order by grantee; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE 'user1'@'localhost' NULL USAGE NO 'user2'@'localhost' NULL USAGE NO diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index bc74bfbf20f..0bcd9ef8c0b 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -576,28 +576,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;