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:
@ -48,6 +48,7 @@ dist-hook:
|
||||
$(INSTALL_DATA) $(srcdir)/t/*.test $(srcdir)/t/*.opt $(srcdir)/t/*.sh $(srcdir)/t/*.slave-mi $(distdir)/t
|
||||
$(INSTALL_DATA) $(srcdir)/include/*.inc $(distdir)/include
|
||||
$(INSTALL_DATA) $(srcdir)/r/*.result $(srcdir)/r/*.require $(distdir)/r
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/Moscow_leap $(distdir)/std_data
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/*.dat $(srcdir)/std_data/*.000001 $(distdir)/std_data
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/des_key_file $(distdir)/std_data
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/*.pem $(distdir)/std_data
|
||||
@ -70,6 +71,7 @@ install-data-local:
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/*.dat $(DESTDIR)$(testdir)/std_data
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/*.*001 $(DESTDIR)$(testdir)/std_data
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/des_key_file $(DESTDIR)$(testdir)/std_data
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/Moscow_leap $(DESTDIR)$(testdir)/std_data
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/*.pem $(DESTDIR)$(testdir)/std_data
|
||||
|
||||
std_data/%.pem:
|
||||
|
@ -248,6 +248,12 @@ 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 db6123;
|
||||
grant usage on db6123.* to test6123 identified by 'magic123';
|
||||
select host,db,user,select_priv,insert_priv from mysql.db where db="db6123";
|
||||
host db user select_priv insert_priv
|
||||
delete from mysql.user where user='test6123';
|
||||
drop database db6123;
|
||||
USE test;
|
||||
CREATE TABLE t1 (a int );
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
|
2
mysql-test/r/have_moscow_leap_timezone.require
Normal file
2
mysql-test/r/have_moscow_leap_timezone.require
Normal file
@ -0,0 +1,2 @@
|
||||
from_unixtime(1072904422)
|
||||
2004-01-01 00:00:00
|
@ -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);
|
||||
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;
|
||||
|
41
mysql-test/r/timezone3.result
Normal file
41
mysql-test/r/timezone3.result
Normal file
@ -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
|
||||
19730101235900
|
||||
20040101235900
|
||||
drop table t1;
|
BIN
mysql-test/std_data/Moscow_leap
Normal file
BIN
mysql-test/std_data/Moscow_leap
Normal file
Binary file not shown.
@ -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