mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into narttu.mysql.fi:/my/mysql-4.0
This commit is contained in:
@ -13,7 +13,8 @@ DB=test
|
||||
DBPASSWD=
|
||||
VERBOSE=""
|
||||
USE_MANAGER=0
|
||||
TZ=GMT-3; export TZ # for UNIX_TIMESTAMP tests to work
|
||||
MY_TZ=GMT-3
|
||||
TZ=$MY_TZ; export TZ # for UNIX_TIMESTAMP tests to work
|
||||
|
||||
#++
|
||||
# Program Definitions
|
||||
@ -1161,9 +1162,18 @@ run_testcase ()
|
||||
if [ -f $master_opt_file ] ;
|
||||
then
|
||||
EXTRA_MASTER_OPT=`$CAT $master_opt_file | $SED -e "s;\\$MYSQL_TEST_DIR;$MYSQL_TEST_DIR;"`
|
||||
case "$EXTRA_MASTER_OPT" in
|
||||
--timezone=*)
|
||||
TZ=`$ECHO "$EXTRA_MASTER_OPT" | $SED -e "s;--timezone=;;"`
|
||||
export TZ
|
||||
# Note that this must be set to space, not "" for test-reset to work
|
||||
EXTRA_MASTER_OPT=" "
|
||||
;;
|
||||
esac
|
||||
stop_master
|
||||
echo "CURRENT_TEST: $tname" >> $MASTER_MYERR
|
||||
start_master
|
||||
TZ=$MY_TZ; export TZ
|
||||
else
|
||||
if [ ! -z "$EXTRA_MASTER_OPT" ] || [ x$MASTER_RUNNING != x1 ] || [ -f $master_init_script ]
|
||||
then
|
||||
|
2
mysql-test/r/have_mest_timezone.require
Normal file
2
mysql-test/r/have_mest_timezone.require
Normal file
@ -0,0 +1,2 @@
|
||||
Variable_name Value
|
||||
timezone MEST
|
25
mysql-test/r/timezone.result
Normal file
25
mysql-test/r/timezone.result
Normal file
@ -0,0 +1,25 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (ts int);
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 01:00'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 02:00'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 03:00'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 02:00'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 01:00'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 02:00'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 02:59:59'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 03:00:00'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 03:59:59'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 04:00:01'));
|
||||
SELECT ts,from_unixtime(ts) FROM t1;
|
||||
ts from_unixtime(ts)
|
||||
1035673200 2002-10-27 01:00:00
|
||||
1035680400 2002-10-27 02:00:00
|
||||
1035684000 2002-10-27 03:00:00
|
||||
1035680400 2002-10-27 02:00:00
|
||||
1035673200 2002-10-27 01:00:00
|
||||
1035680400 2002-10-27 02:00:00
|
||||
1048986000 2003-03-30 03:00:00
|
||||
1048986000 2003-03-30 03:00:00
|
||||
1048989599 2003-03-30 03:59:59
|
||||
1048989601 2003-03-30 04:00:01
|
||||
DROP TABLE t1;
|
@ -1,5 +1,7 @@
|
||||
-- require r/have_raid.require
|
||||
disable_query_log;
|
||||
show variables like "have_raid";
|
||||
enable_query_log;
|
||||
|
||||
#
|
||||
# Test of raided tables
|
||||
|
1
mysql-test/t/timezone-master.opt
Normal file
1
mysql-test/t/timezone-master.opt
Normal file
@ -0,0 +1 @@
|
||||
--timezone=MET
|
28
mysql-test/t/timezone.test
Normal file
28
mysql-test/t/timezone.test
Normal file
@ -0,0 +1,28 @@
|
||||
#
|
||||
# Test of timezone handling. This script must be run with TZ=MEST
|
||||
|
||||
-- require r/have_mest_timezone.require
|
||||
disable_query_log;
|
||||
show variables like "timezone";
|
||||
enable_query_log;
|
||||
|
||||
# Initialization
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
|
||||
CREATE TABLE t1 (ts int);
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 01:00'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 02:00'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 03:00'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 02:00'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 01:00'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 02:00'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 02:59:59'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 03:00:00'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 03:59:59'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 04:00:01'));
|
||||
|
||||
SELECT ts,from_unixtime(ts) FROM t1;
|
||||
DROP TABLE t1;
|
Reference in New Issue
Block a user