diff options
author | monty@mysql.com <> | 2004-11-12 17:48:01 +0200 |
---|---|---|
committer | monty@mysql.com <> | 2004-11-12 17:48:01 +0200 |
commit | b56851fd7ac028233d312c744ea9fea1b65fe4be (patch) | |
tree | 2661295030ea874fb71b238eedd8548c4434b8e5 /mysql-test/r | |
parent | 1288f453cc834ba5cf432282ae054a2d69efcf71 (diff) | |
parent | e9c3887b583e06c7df5df3ca64c367022486a9fc (diff) | |
download | mariadb-git-b56851fd7ac028233d312c744ea9fea1b65fe4be.tar.gz |
Merge on pull
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/grant.result | 44 | ||||
-rw-r--r-- | mysql-test/r/have_moscow_leap_timezone.require | 2 | ||||
-rw-r--r-- | mysql-test/r/mix_innodb_myisam_binlog.result | 21 | ||||
-rw-r--r-- | mysql-test/r/ps_1general.result | 42 | ||||
-rw-r--r-- | mysql-test/r/timezone3.result | 41 |
5 files changed, 112 insertions, 38 deletions
diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index 141e96c8424..f903e35fa1f 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -134,6 +134,31 @@ ERROR HY000: Incorrect usage of DB GRANT and GLOBAL PRIVILEGES select 1; 1 1 +insert into mysql.user (host, user) values ('localhost', 'test11'); +insert into mysql.db (host, db, user, select_priv) values +('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y'); +alter table mysql.db order by db asc; +flush privileges; +show grants for test11@localhost; +Grants for test11@localhost +GRANT USAGE ON *.* TO 'test11'@'localhost' +GRANT SELECT ON `ab%`.* TO 'test11'@'localhost' +GRANT SELECT ON `a%`.* TO 'test11'@'localhost' +alter table mysql.db order by db desc; +flush privileges; +show grants for test11@localhost; +Grants for test11@localhost +GRANT USAGE ON *.* TO 'test11'@'localhost' +GRANT SELECT ON `ab%`.* TO 'test11'@'localhost' +GRANT SELECT ON `a%`.* TO 'test11'@'localhost' +delete from mysql.user where user='test11'; +delete from mysql.db where user='test11'; +create database mysqltest1; +grant usage on mysqltest1.* to test6123 identified by 'magic123'; +select host,db,user,select_priv,insert_priv from mysql.db where db="mysqltest1"; +host db user select_priv insert_priv +delete from mysql.user where user='test6123'; +drop database mysqltest1; create table t1 (a int); grant ALL PRIVILEGES on *.* to drop_user2@localhost with GRANT OPTION; show grants for drop_user2@localhost; @@ -229,25 +254,6 @@ GRANT SELECT (ËÏÌ) ON `ÂÄ`.`ÔÁÂ` TO 'ÀÚÅÒ'@'localhost' REVOKE SELECT (ËÏÌ) ON ÂÄ.ÔÁÂ FROM ÀÚÅÒ@localhost; DROP DATABASE ÂÄ; SET NAMES latin1; -insert into mysql.user (host, user) values ('localhost', 'test11'); -insert into mysql.db (host, db, user, select_priv) values -('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y'); -alter table mysql.db order by db asc; -flush privileges; -show grants for test11@localhost; -Grants for test11@localhost -GRANT USAGE ON *.* TO 'test11'@'localhost' -GRANT SELECT ON `ab%`.* TO 'test11'@'localhost' -GRANT SELECT ON `a%`.* TO 'test11'@'localhost' -alter table mysql.db order by db desc; -flush privileges; -show grants for test11@localhost; -Grants for test11@localhost -GRANT USAGE ON *.* TO 'test11'@'localhost' -GRANT SELECT ON `ab%`.* TO 'test11'@'localhost' -GRANT SELECT ON `a%`.* TO 'test11'@'localhost' -delete from mysql.user where user='test11'; -delete from mysql.db where user='test11'; USE test; CREATE TABLE t1 (a int ); CREATE TABLE t2 LIKE t1; diff --git a/mysql-test/r/have_moscow_leap_timezone.require b/mysql-test/r/have_moscow_leap_timezone.require new file mode 100644 index 00000000000..f27452d7770 --- /dev/null +++ b/mysql-test/r/have_moscow_leap_timezone.require @@ -0,0 +1,2 @@ +from_unixtime(1072904422) +2004-01-01 00:00:00 diff --git a/mysql-test/r/mix_innodb_myisam_binlog.result b/mysql-test/r/mix_innodb_myisam_binlog.result index 54d99d5609e..72288d1027b 100644 --- a/mysql-test/r/mix_innodb_myisam_binlog.result +++ b/mysql-test/r/mix_innodb_myisam_binlog.result @@ -180,4 +180,25 @@ master-bin.000001 79 Query 1 79 use `test`; BEGIN master-bin.000001 119 Query 1 79 use `test`; insert into t1 values(16) master-bin.000001 179 Query 1 79 use `test`; insert into t1 values(18) master-bin.000001 239 Query 1 239 use `test`; COMMIT +delete from t1; +delete from t2; +alter table t2 type=MyISAM; +insert into t1 values (1); +begin; +select * from t1 for update; +a +1 +select (@before:=unix_timestamp())*0; +(@before:=unix_timestamp())*0 +0 +begin; + select * from t1 for update; +insert into t2 values (20); +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +select (@after:=unix_timestamp())*0; +(@after:=unix_timestamp())*0 +0 +select (@after-@before) >= 2; +(@after-@before) >= 2 +1 drop table t1,t2; diff --git a/mysql-test/r/ps_1general.result b/mysql-test/r/ps_1general.result index ccf2945d488..5f8cb2597c6 100644 --- a/mysql-test/r/ps_1general.result +++ b/mysql-test/r/ps_1general.result @@ -1,4 +1,5 @@ -use test; +drop table if exists t5, t6, t7, t8; +drop database if exists mysqltest ; test_sequence ------ basic tests ------ drop table if exists t1, t9 ; @@ -558,7 +559,6 @@ execute stmt3; ERROR 42S01: Table 'new_t2' already exists rename table new_t2 to t2; drop table t2; -drop table if exists t5, t6, t7, t8 ; prepare stmt1 from ' rename table t5 to t6, t7 to t8 ' ; create table t5 (a int) ; execute stmt1 ; @@ -810,21 +810,24 @@ test_sequence ------ grant/revoke/drop affects a parallel session test ------ show grants for second_user@localhost ; ERROR 42000: There is no such grant defined for user 'second_user' on host 'localhost' -grant usage on test.* to second_user@localhost +create database mysqltest; +use mysqltest; +use test; +grant usage on mysqltest.* to second_user@localhost identified by 'looser' ; -grant select on test.t9 to second_user@localhost +grant select on mysqltest.t9 to second_user@localhost identified by 'looser' ; show grants for second_user@localhost ; Grants for second_user@localhost GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' -GRANT SELECT ON `test`.`t9` TO 'second_user'@'localhost' +GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost' select current_user(); current_user() second_user@localhost show grants for current_user(); Grants for second_user@localhost GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' -GRANT SELECT ON `test`.`t9` TO 'second_user'@'localhost' +GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost' prepare s_t9 from 'select c1 as my_col from t9 where c1= 1' ; execute s_t9 ; @@ -832,24 +835,24 @@ my_col 1 select a as my_col from t1; ERROR 42000: select command denied to user 'second_user'@'localhost' for table 't1' -grant select on test.t1 to second_user@localhost +grant select on mysqltest.t1 to second_user@localhost identified by 'looser' ; show grants for second_user@localhost ; Grants for second_user@localhost GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' -GRANT SELECT ON `test`.`t1` TO 'second_user'@'localhost' -GRANT SELECT ON `test`.`t9` TO 'second_user'@'localhost' -drop table t9 ; +GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost' +GRANT SELECT ON `mysqltest`.`t1` TO 'second_user'@'localhost' +drop table mysqltest.t9 ; show grants for second_user@localhost ; Grants for second_user@localhost GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' -GRANT SELECT ON `test`.`t1` TO 'second_user'@'localhost' -GRANT SELECT ON `test`.`t9` TO 'second_user'@'localhost' +GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost' +GRANT SELECT ON `mysqltest`.`t1` TO 'second_user'@'localhost' show grants for second_user@localhost ; Grants for second_user@localhost GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' -GRANT SELECT ON `test`.`t1` TO 'second_user'@'localhost' -GRANT SELECT ON `test`.`t9` TO 'second_user'@'localhost' +GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost' +GRANT SELECT ON `mysqltest`.`t1` TO 'second_user'@'localhost' prepare s_t1 from 'select a as my_col from t1' ; execute s_t1 ; my_col @@ -858,17 +861,17 @@ my_col 3 4 execute s_t9 ; -ERROR 42S02: Table 'test.t9' doesn't exist -revoke all privileges on test.t1 from second_user@localhost +ERROR 42S02: Table 'mysqltest.t9' doesn't exist +revoke all privileges on mysqltest.t1 from second_user@localhost identified by 'looser' ; show grants for second_user@localhost ; Grants for second_user@localhost GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' -GRANT SELECT ON `test`.`t9` TO 'second_user'@'localhost' +GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost' show grants for second_user@localhost ; Grants for second_user@localhost GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' -GRANT SELECT ON `test`.`t9` TO 'second_user'@'localhost' +GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost' execute s_t1 ; ERROR 42000: select command denied to user 'second_user'@'localhost' for table 't1' revoke all privileges, grant option from second_user@localhost ; @@ -879,4 +882,5 @@ drop user second_user@localhost ; commit ; show grants for second_user@localhost ; ERROR 42000: There is no such grant defined for user 'second_user' on host 'localhost' -drop table t1 ; +drop table t1,t9 ; +drop database mysqltest; diff --git a/mysql-test/r/timezone3.result b/mysql-test/r/timezone3.result new file mode 100644 index 00000000000..ec0b6045f93 --- /dev/null +++ b/mysql-test/r/timezone3.result @@ -0,0 +1,41 @@ +drop table if exists t1; +create table t1 (i int, c varchar(20)); +insert into t1 values +(unix_timestamp("2004-01-01 00:00:00"), "2004-01-01 00:00:00"); +insert into t1 values +(unix_timestamp("2004-03-28 01:59:59"), "2004-03-28 01:59:59"), +(unix_timestamp("2004-03-28 02:30:00"), "2004-03-28 02:30:00"), +(unix_timestamp("2004-03-28 03:00:00"), "2004-03-28 03:00:00"); +insert into t1 values +(unix_timestamp('2004-05-01 00:00:00'),'2004-05-01 00:00:00'); +insert into t1 values +(unix_timestamp('2004-10-31 01:00:00'),'2004-10-31 01:00:00'), +(unix_timestamp('2004-10-31 02:00:00'),'2004-10-31 02:00:00'), +(unix_timestamp('2004-10-31 02:59:59'),'2004-10-31 02:59:59'), +(unix_timestamp('2004-10-31 04:00:00'),'2004-10-31 04:00:00'), +(unix_timestamp('2004-10-31 02:59:59'),'2004-10-31 02:59:59'); +insert into t1 values +(unix_timestamp('1981-07-01 03:59:59'),'1981-07-01 03:59:59'), +(unix_timestamp('1981-07-01 04:00:00'),'1981-07-01 04:00:00'); +select i, from_unixtime(i), c from t1; +i from_unixtime(i) c +1072904422 2004-01-01 00:00:00 2004-01-01 00:00:00 +1080428421 2004-03-28 01:59:59 2004-03-28 01:59:59 +1080428422 2004-03-28 03:00:00 2004-03-28 02:30:00 +1080428422 2004-03-28 03:00:00 2004-03-28 03:00:00 +1083355222 2004-05-01 00:00:00 2004-05-01 00:00:00 +1099170022 2004-10-31 01:00:00 2004-10-31 01:00:00 +1099177222 2004-10-31 02:00:00 2004-10-31 02:00:00 +1099180821 2004-10-31 02:59:59 2004-10-31 02:59:59 +1099184422 2004-10-31 04:00:00 2004-10-31 04:00:00 +1099180821 2004-10-31 02:59:59 2004-10-31 02:59:59 +362793608 1981-07-01 03:59:59 1981-07-01 03:59:59 +362793610 1981-07-01 04:00:00 1981-07-01 04:00:00 +drop table t1; +create table t1 (ts timestamp); +insert into t1 values (19730101235900), (20040101235900); +select * from t1; +ts +1973-01-01 23:59:00 +2004-01-01 23:59:00 +drop table t1; |