mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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
This commit is contained in:
@ -97,6 +97,30 @@ drop table t1;
|
||||
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'
|
||||
#
|
||||
@ -174,21 +198,6 @@ REVOKE SELECT (
|
||||
DROP DATABASE <20><>;
|
||||
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
|
||||
#
|
||||
|
1
mysql-test/t/mix_innodb_myisam_binlog-master.opt
Normal file
1
mysql-test/t/mix_innodb_myisam_binlog-master.opt
Normal file
@ -0,0 +1 @@
|
||||
--loose-innodb_lock_wait_timeout=2
|
@ -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;
|
||||
|
1
mysql-test/t/timezone3-master.opt
Normal file
1
mysql-test/t/timezone3-master.opt
Normal file
@ -0,0 +1 @@
|
||||
--timezone=:$MYSQL_TEST_DIR/std_data/Moscow_leap
|
59
mysql-test/t/timezone3.test
Normal file
59
mysql-test/t/timezone3.test
Normal file
@ -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;
|
Reference in New Issue
Block a user