Debian Codegraph @

mysql-test/suite/funcs_1/datadict/datadict_load.inc

raw
1 #### suite/funcs_1/datadict/datadict_load.inc
2 #
3 # The sub testcases are nearly independend. That is the reason why we do not
4 # want to abort after the first error.
5 --disable_abort_on_error
6
7 ################################################################################
8 #
9 # prepare variables for --replace_result
10 #
11 ################################################################################
12 --disable_query_log
13
14 # ------------------------------------------------------------------------------
15 # Get the size of ONE known colum and check the size against some values to
16 # be able to use the correct --replace_result statement. Using this only the
17 # one pair of 'wrong' values is replaced and not all occurrencies of all
18 # possible pairs of values. See bug #12777 for details.
19 --disable_cursor_protocol
20 SELECT character_maximum_length INTO @CML
21 FROM information_schema.columns
22 WHERE table_schema = 'information_schema'
23 AND table_name = 'columns'
24 AND column_name = 'table_catalog';
25 --enable_cursor_protocol
26
27 let $bug_12777_0512= `SELECT @CML = 512`;
28 let $bug_12777_1023= `SELECT @CML = 1023`;
29 let $bug_12777_1024= `SELECT @CML = 1024`;
30 let $bug_12777_2048= `SELECT @CML = 2048`;
31 # 4096 is the value used in the .results
32 let $bug_12777_4095= `SELECT @CML = 4095`;
33
34 if (0)
35 {
36 # enable this for debugging only, but NOT in a pushed version, as then the
37 # result changes from OS to OS ...
38 eval SELECT @CML AS 'CML',
39 $bug_12777_0512 AS '512',
40 $bug_12777_1023 AS '1023',
41 $bug_12777_1024 AS '1024',
42 $bug_12777_2048 AS '2048',
43 $bug_12777_4095 AS '4095';
44 }
45
46 # ------------------------------------------------------------------------------
47 # prepare a variable to be able to suppress machine dependant diffs
48 # this can be used in: --replace_result $SERVER_NAME <SERVER_NAME>
49 # let $SERVER_NAME= `SELECT DISTINCT host FROM mysql.user WHERE host LIKE "%\%" AND host NOT In ("localhost", "127.0.0.1", "%")`;
50 let $SERVER_NAME= `SELECT DISTINCT host FROM mysql.user WHERE host NOT In ("localhost", "127.0.0.1", "%")`;
51
52
53 ################################################################################
54 #
55 # load tables
56 # -----------
57 #
58 # this was part of the 4 files $<engine>_datadict.test, but it has been moved
59 # here to have only one place where all preparation for the test is done.
60 #
61 ################################################################################
62
63 eval SET @ENGINE_INNODB = IF( '$engine_type' = 'innodb', 1, 0);
64 eval SET @ENGINE_MEMORY = IF( '$engine_type' = 'memory', 1, 0);
65 eval SET @ENGINE_MYISAM = IF( '$engine_type' = 'myisam', 1, 0);
66 --enable_query_log
67
68 let $engine_myisam= `SELECT @ENGINE_MYISAM = 1`;
69 let $engine_innodb= `SELECT @ENGINE_INNODB = 1`;
70 let $engine_memory= `SELECT @ENGINE_MEMORY = 1`;
71
72 --disable_warnings
73 DROP DATABASE IF EXISTS test1;
74 --enable_warnings
75 CREATE DATABASE test1 CHARACTER SET latin1;
76 USE test;
77
78 if ($engine_innodb)
79 {
80 --source suite/funcs_1/include/innodb_tb1.inc
81 --source suite/funcs_1/include/innodb_tb2.inc
82 --source suite/funcs_1/include/innodb_tb3.inc
83 --source suite/funcs_1/include/innodb_tb4.inc
84 USE test1;
85 --source suite/funcs_1/include/innodb_tb2.inc
86 }
87
88 if ($engine_memory)
89 {
90 --source suite/funcs_1/include/memory_tb1.inc
91 --source suite/funcs_1/include/memory_tb2.inc
92 --source suite/funcs_1/include/memory_tb3.inc
93 --source suite/funcs_1/include/memory_tb4.inc
94 USE test1;
95 --source suite/funcs_1/include/memory_tb2.inc
96 }
97
98 if ($engine_myisam)
99 {
100 --source suite/funcs_1/include/myisam_tb1.inc
101 --source suite/funcs_1/include/myisam_tb2.inc
102 --source suite/funcs_1/include/myisam_tb3.inc
103 --source suite/funcs_1/include/myisam_tb4.inc
104 USE test1;
105 --source suite/funcs_1/include/myisam_tb2.inc
106 }
107
108 USE test;
109 --source suite/funcs_1/include/sp_tb.inc