summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/storage_engine/1st.test
blob: c9ebd8b75e4c6c54120d3322a0170a4661ae5e29 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# 
# This test checks some very basic capabilities
# which will be used in almost every other test,
# and will not be checked through support* variables.
# If this test does not pass, there is no point
# at executing other ones.
#
# Minimal requirements:
# - supported column types: INT, CHAR (default CHAR(8), INT(11));
# - column attributes as declared in define_engine.inc ($default_col_opts)
#     (by default empty, which means no additional attributes apart from the type);
# - table attributes as declared in define_engine.inc ($default_tbl_opts)
#     (by default empty, which means no additional attributes apart from ENGINE);
# - CREATE TABLE .. (column1 <column options>, column2 <column options>) ENGINE=<storage_engine>;
# - INSERT INTO TABLE .. VALUES (val1,val2);
# - DROP TABLE ..
# - SELECT a,b FROM ..
# - SHOW CREATE TABLE ..
# - SHOW COLUMNS IN ...
#

--source have_engine.inc

--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings

--source create_table.inc
if ($mysql_errname)
{
  --let $functionality = CREATE TABLE
  --source unexpected_result.inc
}
if (!$mysql_errname)
{
  --disable_result_log
  SHOW CREATE TABLE t1;
  if ($mysql_errname)
  {
    --let $functionality = SHOW CREATE TABLE
    --source unexpected_result.inc
  }
  SHOW COLUMNS IN t1;
  if ($mysql_errname)
  {
    --let $functionality = SHOW COLUMNS
    --source unexpected_result.inc
  }
  --enable_result_log

  INSERT INTO t1 VALUES (1,'a');
  if ($mysql_errname)
  {
    --let $functionality = INSERT INTO .. VALUES
    --source unexpected_result.inc
  }

  INSERT INTO t1 (a,b) VALUES (2,'b');
  if ($mysql_errname)
  {
    --let $functionality = INSERT INTO .. (column_list) VALUES
    --source unexpected_result.inc
  }

  SELECT a,b FROM t1;
  if ($mysql_errname)
  {
    --let $functionality = SELECT a,b FROM ..
    --source unexpected_result.inc
  }

  DROP TABLE t1;
  if ($mysql_errname)
  {
    --let $functionality = DROP TABLE
    --source unexpected_result.inc
  }

}
--source cleanup_engine.inc