diff options
author | Alexander Barkov <bar@mnogosearch.org> | 2013-11-13 18:28:40 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mnogosearch.org> | 2013-11-13 18:28:40 +0400 |
commit | 1bb3a0e3c856dd4c5846b41da7962ac3478f7945 (patch) | |
tree | 425760aaa3436554e761f8331e3c9a192811a31b /mysql-test | |
parent | d5cd8cd72406cf351546ba8130ec89a8297fd670 (diff) | |
parent | f2cfcd91f56d81d40b1f5e2dbb5b643dc207bf53 (diff) | |
download | mariadb-git-1bb3a0e3c856dd4c5846b41da7962ac3478f7945.tar.gz |
Merge 5.1 -> 5.2
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/Makefile.am | 2 | ||||
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 7 | ||||
-rw-r--r-- | mysql-test/r/mysql_tzinfo_to_sql_symlink.result | 22 | ||||
-rw-r--r-- | mysql-test/std_data/zoneinfo/GMT | bin | 0 -> 118 bytes | |||
-rw-r--r-- | mysql-test/t/mysql_tzinfo_to_sql_symlink.test | 15 |
5 files changed, 45 insertions, 1 deletions
diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am index 49c7e06ec2d..9646ac3750c 100644 --- a/mysql-test/Makefile.am +++ b/mysql-test/Makefile.am @@ -80,7 +80,7 @@ EXTRA_DIST = README README.suites \ TEST_DIRS = t r include std_data std_data/parts collections \ std_data/ndb_backup50 std_data/ndb_backup51 \ std_data/ndb_backup51_data_be std_data/ndb_backup51_data_le \ - std_data/funcs_1 \ + std_data/funcs_1 std_data/zoneinfo \ extra/binlog_tests/ extra/rpl_tests \ suite/binlog suite/binlog/t suite/binlog/r suite/binlog/std_data \ suite/federated \ diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 60253a06276..6ecc0ad6aba 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -2308,6 +2308,13 @@ sub environment_setup { "$path_client_bindir/perror"); $ENV{'MY_PERROR'}= native_path($exe_perror); + # ---------------------------------------------------- + # mysql_tzinfo_to_sql + # ---------------------------------------------------- + my $exe_mysql_tzinfo_to_sql= mtr_exe_exists("$basedir/sql$opt_vs_config/mysql_tzinfo_to_sql", + "$path_client_bindir/mysql_tzinfo_to_sql"); + $ENV{'MYSQL_TZINFO_TO_SQL'}= native_path($exe_mysql_tzinfo_to_sql); + # Create an environment variable to make it possible # to detect that valgrind is being used from test cases $ENV{'VALGRIND_TEST'}= $opt_valgrind; diff --git a/mysql-test/r/mysql_tzinfo_to_sql_symlink.result b/mysql-test/r/mysql_tzinfo_to_sql_symlink.result new file mode 100644 index 00000000000..fce61687c83 --- /dev/null +++ b/mysql-test/r/mysql_tzinfo_to_sql_symlink.result @@ -0,0 +1,22 @@ +# +# MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above +# +TRUNCATE TABLE time_zone; +TRUNCATE TABLE time_zone_name; +TRUNCATE TABLE time_zone_transition; +TRUNCATE TABLE time_zone_transition_type; +INSERT INTO time_zone (Use_leap_seconds) VALUES ('N'); +SET @time_zone_id= LAST_INSERT_ID(); +INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('GMT', @time_zone_id); +INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, Is_DST, Abbreviation) VALUES + (@time_zone_id, 0, 0, 0, 'GMT') +; +INSERT INTO time_zone (Use_leap_seconds) VALUES ('N'); +SET @time_zone_id= LAST_INSERT_ID(); +INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('posix/GMT', @time_zone_id); +INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, Is_DST, Abbreviation) VALUES + (@time_zone_id, 0, 0, 0, 'GMT') +; +Warning: Skipping directory 'MYSQLTEST_VARDIR/zoneinfo/posix/posix': to avoid infinite symlink recursion. +ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time; +ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id; diff --git a/mysql-test/std_data/zoneinfo/GMT b/mysql-test/std_data/zoneinfo/GMT Binary files differnew file mode 100644 index 00000000000..2ee14295f10 --- /dev/null +++ b/mysql-test/std_data/zoneinfo/GMT diff --git a/mysql-test/t/mysql_tzinfo_to_sql_symlink.test b/mysql-test/t/mysql_tzinfo_to_sql_symlink.test new file mode 100644 index 00000000000..d29d40f5679 --- /dev/null +++ b/mysql-test/t/mysql_tzinfo_to_sql_symlink.test @@ -0,0 +1,15 @@ +--source include/have_symlink.inc +--source include/not_windows.inc + +--echo # +--echo # MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above +--echo # + +--exec mkdir $MYSQLTEST_VARDIR/zoneinfo +--exec ln -s $MYSQLTEST_VARDIR/zoneinfo $MYSQLTEST_VARDIR/zoneinfo/posix +--copy_file std_data/zoneinfo/GMT $MYSQLTEST_VARDIR/zoneinfo/GMT + +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--exec $MYSQL_TZINFO_TO_SQL $MYSQLTEST_VARDIR/zoneinfo 2>&1 + +--exec rm -rf $MYSQLTEST_VARDIR/zoneinfo |