diff options
author | unknown <monty@mysql.com> | 2004-11-12 11:17:53 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-11-12 11:17:53 +0200 |
commit | 44070705ea958c57faa486e7f22ca5fb1ada095c (patch) | |
tree | 59f4a8722fd9657366da60b4af149031105872ab /mysql-test/t | |
parent | 6a1bc4a52a8446775dbb428c2701d903b7902ad3 (diff) | |
parent | b19eb67f08d04de3af744097e72023d550329035 (diff) | |
download | mariadb-git-44070705ea958c57faa486e7f22ca5fb1ada095c.tar.gz |
merge with 4.0
BitKeeper/etc/logging_ok:
auto-union
BitKeeper/deleted/.del-Makefile.am:
Delete: Docs/Images/Makefile.am
Build-tools/Bootstrap:
Auto merged
Docs/Makefile.am:
Auto merged
configure.in:
Auto merged
include/mysql.h:
Auto merged
innobase/dict/dict0dict.c:
Auto merged
libmysql/libmysql.c:
Auto merged
mysys/default.c:
Auto merged
scripts/mysqld_safe.sh:
Auto merged
sql/log.cc:
Auto merged
mysql-test/t/mix_innodb_myisam_binlog.test:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_table.cc:
Auto merged
client/mysqldump.c:
merge with 4.0
(This only reorders options)
sql/ha_innodb.cc:
merge with 4.0 (Keep original code)
sql/time.cc:
Note that part of this patch is done in my_time.c
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/grant.test | 39 | ||||
-rw-r--r-- | mysql-test/t/mix_innodb_myisam_binlog-master.opt | 1 | ||||
-rw-r--r-- | mysql-test/t/mix_innodb_myisam_binlog.test | 32 | ||||
-rw-r--r-- | mysql-test/t/timezone3-master.opt | 1 | ||||
-rw-r--r-- | mysql-test/t/timezone3.test | 59 |
5 files changed, 117 insertions, 15 deletions
diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test index d9c281cfebc..963b9ae5080 100644 --- a/mysql-test/t/grant.test +++ b/mysql-test/t/grant.test @@ -98,6 +98,30 @@ GRANT FILE on mysqltest.* to mysqltest_1@localhost; select 1; -- To test that the previous command didn't cause problems # +# Bug #4898: User privileges depending on ORDER BY Settings of table db +# +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; +alter table mysql.db order by db desc; +flush privileges; +show grants for test11@localhost; +delete from mysql.user where user='test11'; +delete from mysql.db where user='test11'; + +# +# Bug#6123: GRANT USAGE inserts useless Db row +# +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"; +delete from mysql.user where user='test6123'; +drop database mysqltest1; + +# # Test for 'drop user', 'revoke privileges, grant' # @@ -175,21 +199,6 @@ DROP DATABASE ÂÄ; SET NAMES latin1; # -# Bug #4898: User privileges depending on ORDER BY Settings of table db -# -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; -alter table mysql.db order by db desc; -flush privileges; -show grants for test11@localhost; -delete from mysql.user where user='test11'; -delete from mysql.db where user='test11'; - -# # Bug #5831: REVOKE ALL PRIVILEGES, GRANT OPTION does not revoke everything # USE test; diff --git a/mysql-test/t/mix_innodb_myisam_binlog-master.opt b/mysql-test/t/mix_innodb_myisam_binlog-master.opt new file mode 100644 index 00000000000..cb48f1aaf60 --- /dev/null +++ b/mysql-test/t/mix_innodb_myisam_binlog-master.opt @@ -0,0 +1 @@ +--loose-innodb_lock_wait_timeout=2 diff --git a/mysql-test/t/mix_innodb_myisam_binlog.test b/mysql-test/t/mix_innodb_myisam_binlog.test index 9c576b080ca..89a7f8f3036 100644 --- a/mysql-test/t/mix_innodb_myisam_binlog.test +++ b/mysql-test/t/mix_innodb_myisam_binlog.test @@ -172,4 +172,36 @@ select a from t1 order by a; # check that savepoints work :) show binlog events from 79; +# Test for BUG#5714, where a MyISAM update in the transaction used to +# release row-level locks in InnoDB + +connect (con3,localhost,root,,); + +connection con3; +delete from t1; +delete from t2; +--disable_warnings +alter table t2 type=MyISAM; +--enable_warnings +insert into t1 values (1); +begin; +select * from t1 for update; + +connection con2; +select (@before:=unix_timestamp())*0; # always give repeatable output +begin; +send select * from t1 for update; + +connection con3; +insert into t2 values (20); + +connection con2; +--error 1205 +reap; +select (@after:=unix_timestamp())*0; # always give repeatable output +# verify that innodb_lock_wait_timeout was exceeded. When there was +# the bug, the reap would return immediately after the insert into t2. +select (@after-@before) >= 2; + +# cleanup drop table t1,t2; diff --git a/mysql-test/t/timezone3-master.opt b/mysql-test/t/timezone3-master.opt new file mode 100644 index 00000000000..6910e6e6e8d --- /dev/null +++ b/mysql-test/t/timezone3-master.opt @@ -0,0 +1 @@ +--timezone=:$MYSQL_TEST_DIR/std_data/Moscow_leap diff --git a/mysql-test/t/timezone3.test b/mysql-test/t/timezone3.test new file mode 100644 index 00000000000..8910783cd85 --- /dev/null +++ b/mysql-test/t/timezone3.test @@ -0,0 +1,59 @@ +# +# Test of handling time zone with leap seconds. +# +# This test should be run with TZ=:$MYSQL_TEST_DIR/std_data/Moscow_leap +# This implies that this test should be run only on systems that interpret +# characters after colon in TZ variable as path to zoneinfo file. +# +# Check that we have successfully set time zone with leap seconds. +--require r/have_moscow_leap_timezone.require +disable_query_log; +select from_unixtime(1072904422); +enable_query_log; + +# Initial clean-up +--disable_warnings +drop table if exists t1; +--enable_warnings + +# +# Let us check behavior of conversion from broken-down representation +# to time_t representation, for normal, non-existent and ambigious dates +# (This check is similar to the one in timezone2.test in 4.1) +# +create table t1 (i int, c varchar(20)); +# Normal value without DST +insert into t1 values + (unix_timestamp("2004-01-01 00:00:00"), "2004-01-01 00:00:00"); +# Values around and in spring time-gap +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"); +# Normal value with DST +insert into t1 values + (unix_timestamp('2004-05-01 00:00:00'),'2004-05-01 00:00:00'); +# Ambiguos values (also check for determenism) +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'); +# Test of leap +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; +drop table t1; + +# +# Test for bug #6387 "Queried timestamp values do not match the +# inserted". my_gmt_sec() function was not working properly if we +# had time zone with leap seconds +# +create table t1 (ts timestamp); +insert into t1 values (19730101235900), (20040101235900); +select * from t1; +drop table t1; |