Debian Codegraph @

mysql-test/suite/storage_engine/1st.test

raw
1 #
2 # This test checks some very basic capabilities
3 # which will be used in almost every other test,
4 # and will not be checked through support* variables.
5 # If this test does not pass, there is no point
6 # at executing other ones.
7 #
8 # Minimal requirements:
9 # - supported column types: INT, CHAR (default CHAR(8), INT(11));
10 # - column attributes as declared in define_engine.inc ($default_col_opts)
11 # (by default empty, which means no additional attributes apart from the type);
12 # - table attributes as declared in define_engine.inc ($default_tbl_opts)
13 # (by default empty, which means no additional attributes apart from ENGINE);
14 # - CREATE TABLE .. (column1 <column options>, column2 <column options>) ENGINE=<storage_engine>;
15 # - INSERT INTO TABLE .. VALUES (val1,val2);
16 # - DROP TABLE ..
17 # - SELECT a,b FROM ..
18 # - SHOW CREATE TABLE ..
19 # - SHOW COLUMNS IN ...
20 #
21
22 --source have_engine.inc
23
24 --disable_warnings
25 DROP TABLE IF EXISTS t1;
26 --enable_warnings
27
28 --source create_table.inc
29 if ($mysql_errname)
30 {
31 --let $functionality = CREATE TABLE
32 --source unexpected_result.inc
33 }
34 if (!$mysql_errname)
35 {
36 --disable_result_log
37 SHOW CREATE TABLE t1;
38 if ($mysql_errname)
39 {
40 --let $functionality = SHOW CREATE TABLE
41 --source unexpected_result.inc
42 }
43 SHOW COLUMNS IN t1;
44 if ($mysql_errname)
45 {
46 --let $functionality = SHOW COLUMNS
47 --source unexpected_result.inc
48 }
49 --enable_result_log
50
51 INSERT INTO t1 VALUES (1,'a');
52 if ($mysql_errname)
53 {
54 --let $functionality = INSERT INTO .. VALUES
55 --source unexpected_result.inc
56 }
57
58 INSERT INTO t1 (a,b) VALUES (2,'b');
59 if ($mysql_errname)
60 {
61 --let $functionality = INSERT INTO .. (column_list) VALUES
62 --source unexpected_result.inc
63 }
64
65 SELECT a,b FROM t1;
66 if ($mysql_errname)
67 {
68 --let $functionality = SELECT a,b FROM ..
69 --source unexpected_result.inc
70 }
71
72 DROP TABLE t1;
73 if ($mysql_errname)
74 {
75 --let $functionality = DROP TABLE
76 --source unexpected_result.inc
77 }
78
79 }
80 --source cleanup_engine.inc
81