diff options
Diffstat (limited to 'mysql-test/suite/funcs_1/t')
-rw-r--r-- | mysql-test/suite/funcs_1/t/is_user_privileges.test | 22 | ||||
-rw-r--r-- | mysql-test/suite/funcs_1/t/row_count_func.test | 2 | ||||
-rw-r--r-- | mysql-test/suite/funcs_1/t/storedproc.test | 1 |
3 files changed, 18 insertions, 7 deletions
diff --git a/mysql-test/suite/funcs_1/t/is_user_privileges.test b/mysql-test/suite/funcs_1/t/is_user_privileges.test index a61e9187d15..4293c4e16fb 100644 --- a/mysql-test/suite/funcs_1/t/is_user_privileges.test +++ b/mysql-test/suite/funcs_1/t/is_user_privileges.test @@ -77,9 +77,6 @@ WHERE table_catalog IS NULL OR table_catalog <> 'def'; # 3.2.16.4: Ensure that the table does not show any information on any # privileges that are not user privileges for the current user. # ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings CREATE DATABASE db_datadict; --error 0,ER_CANNOT_USER @@ -93,7 +90,7 @@ DROP USER 'testuser3'@'localhost'; CREATE USER 'testuser3'@'localhost'; GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost'; -GRANT SELECT ON mysql.user TO 'testuser1'@'localhost'; +GRANT SELECT ON mysql.global_priv TO 'testuser1'@'localhost'; GRANT INSERT ON *.* TO 'testuser2'@'localhost'; GRANT UPDATE ON *.* TO 'testuser2'@'localhost'; @@ -101,11 +98,12 @@ GRANT UPDATE ON *.* TO 'testuser2'@'localhost'; let $my_select1= SELECT * FROM information_schema.user_privileges WHERE grantee LIKE '''testuser%''' ORDER BY grantee, table_catalog, privilege_type; -let $my_select2= SELECT * FROM mysql.user +let $my_select2= SELECT host,user,json_detailed(priv) FROM mysql.global_priv WHERE user LIKE 'testuser%' ORDER BY host, user; let $my_show= SHOW GRANTS; --vertical_results eval $my_select1; +--replace_regex /password_last_changed": [0-9]*/password_last_changed": #/ eval $my_select2; --horizontal_results @@ -114,6 +112,7 @@ eval $my_select2; GRANT UPDATE ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION; --vertical_results eval $my_select1; +--replace_regex /password_last_changed": [0-9]*/password_last_changed": #/ eval $my_select2; --horizontal_results @@ -121,6 +120,7 @@ eval $my_select2; connect (testuser1, localhost, testuser1, , db_datadict); --vertical_results eval $my_select1; +--replace_regex /password_last_changed": [0-9]*/password_last_changed": #/ eval $my_select2; --horizontal_results eval $my_show; @@ -134,6 +134,7 @@ GRANT SELECT ON *.* TO 'testuser1'@'localhost'; --echo # Here <SELECT NO> is shown correctly for testuser1; --vertical_results eval $my_select1; +--replace_regex /password_last_changed": [0-9]*/password_last_changed": #/ eval $my_select2; --horizontal_results @@ -142,6 +143,7 @@ GRANT SELECT ON *.* TO 'testuser1'@'localhost' WITH GRANT OPTION; --echo # Here <SELECT YES> is shown correctly for testuser1; --vertical_results eval $my_select1; +--replace_regex /password_last_changed": [0-9]*/password_last_changed": #/ eval $my_select2; --horizontal_results @@ -149,6 +151,7 @@ eval $my_select2; connection testuser1; --vertical_results eval $my_select1; +--replace_regex /password_last_changed": [0-9]*/password_last_changed": #/ eval $my_select2; --horizontal_results eval $my_show; @@ -177,6 +180,7 @@ connection default; REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'testuser1'@'localhost'; --vertical_results eval $my_select1; +--replace_regex /password_last_changed": [0-9]*/password_last_changed": #/ eval $my_select2; --horizontal_results @@ -203,18 +207,20 @@ eval $my_show; CREATE TABLE db_datadict.tb_66 ( c1 TEXT ); --echo ---echo # Add ALL on db_datadict.* (and select on mysql.user) to testuser1; +--echo # Add ALL on db_datadict.* (and select on mysql.global_priv) to testuser1; connection default; GRANT ALL ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION; -GRANT SELECT ON mysql.user TO 'testuser1'@'localhost'; +GRANT SELECT ON mysql.global_priv TO 'testuser1'@'localhost'; --vertical_results eval $my_select1; +--replace_regex /password_last_changed": [0-9]*/password_last_changed": #/ eval $my_select2; --horizontal_results connection testuser1; --vertical_results eval $my_select1; +--replace_regex /password_last_changed": [0-9]*/password_last_changed": #/ eval $my_select2; --horizontal_results eval $my_show; @@ -227,6 +233,7 @@ CREATE TABLE db_datadict.tb_56 ( c1 TEXT ); USE db_datadict; --vertical_results eval $my_select1; +--replace_regex /password_last_changed": [0-9]*/password_last_changed": #/ eval $my_select2; --horizontal_results eval $my_show; @@ -241,6 +248,7 @@ connection default; REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'testuser1'@'localhost'; --vertical_results eval $my_select1; +--replace_regex /password_last_changed": [0-9]*/password_last_changed": #/ eval $my_select2; --horizontal_results diff --git a/mysql-test/suite/funcs_1/t/row_count_func.test b/mysql-test/suite/funcs_1/t/row_count_func.test index 1694928b26c..3a76a6cac7c 100644 --- a/mysql-test/suite/funcs_1/t/row_count_func.test +++ b/mysql-test/suite/funcs_1/t/row_count_func.test @@ -14,6 +14,7 @@ INSERT INTO t1 VALUES (1), (2), (3); --echo --echo # -- Check 1. +--disable_warnings --enable_info --echo SELECT * FROM t1 INTO OUTFILE "MYSQL_TMP_DIR/bug21818.txt"; --disable_query_log # to avoid $MYSQL_TMP_DIR in query log @@ -34,6 +35,7 @@ SELECT a FROM t1 LIMIT 1 INTO @a; --echo SELECT ROW_COUNT(); +--enable_warnings --echo --echo # -- Check 3. diff --git a/mysql-test/suite/funcs_1/t/storedproc.test b/mysql-test/suite/funcs_1/t/storedproc.test index f5852ea016f..7ca9ba6f3d1 100644 --- a/mysql-test/suite/funcs_1/t/storedproc.test +++ b/mysql-test/suite/funcs_1/t/storedproc.test @@ -18863,6 +18863,7 @@ delimiter //; --error ER_PARSE_ERROR CREATE PROCEDURE sp7() BEGIN + DECLARE count INT DEFAULT 100; label1: loop set @dummystring = 'temp value'; if count > 10 then leave label1; |