diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
commit | 3f619478f796eddbba6e39502fe941b285dd97b1 (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/init_file.test | |
parent | Initial commit. (diff) | |
download | mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.tar.xz mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/init_file.test')
-rw-r--r-- | mysql-test/main/init_file.test | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/mysql-test/main/init_file.test b/mysql-test/main/init_file.test new file mode 100644 index 00000000..65e54db4 --- /dev/null +++ b/mysql-test/main/init_file.test @@ -0,0 +1,37 @@ +# +# This is a regression test for bug #2526 "--init-file crashes MySQL if it +# contains a large select" +# +# See mysql-test/std_data/init_file.dat and +# mysql-test/t/init_file-master.opt for the actual test +# + +# +# Bug#23240 --init-file statements with NOW() reports '1970-01-01 11:00:00'as the date time +# +INSERT INTO init_file.startup VALUES ( NOW() ); +SELECT * INTO @X FROM init_file.startup limit 0,1; +SELECT * INTO @Y FROM init_file.startup limit 1,1; +SELECT YEAR(@X)-YEAR(@Y); + +--echo ok +--echo end of 4.1 tests +# +# Check 5.x features +# +# Expected: +# 3, 5, 7, 11, 13 +select * from t1; +# Expected: +# 30, 3, 11, 13 +select * from t2; + +# +# we don't drop tables (t1, t2) and databases (init_file) +# created by init-file script, because they existed when before-test +# check was run, and if they won't exist after the test, after-test check +# will complain. +# But it's safe to keep them, because mysqld will be restarted after the +# test (--init-file option) and datadir will be reinitialized. +# + |