summaryrefslogtreecommitdiff
path: root/mysql-test/main/init_file.test
blob: 65e54db43ea7da66119a9dd5f4bd8bd3c269d192 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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.
#