1-- Copyright (c) 2013, 2021, Oracle and/or its affiliates.
2--
3-- This program is free software; you can redistribute it and/or modify
4-- it under the terms of the GNU General Public License as published by
5-- the Free Software Foundation; version 2 of the License.
6--
7-- This program is also distributed with certain software (including
8-- but not limited to OpenSSL) that is licensed under separate terms,
9-- as designated in a particular file or component or in included license
10-- documentation.  The authors of MySQL hereby grant you an additional
11-- permission to link the program and your derivative works with the
12-- separately licensed software that they have included with MySQL.
13--
14-- This program is distributed in the hope that it will be useful,
15-- but WITHOUT ANY WARRANTY; without even the implied warranty of
16-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17-- GNU General Public License for more details.
18--
19-- You should have received a copy of the GNU General Public License
20-- along with this program; if not, write to the Free Software
21-- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22
23use test;
24drop table if exists tbl1;
25create table IF NOT EXISTS tbl1 (i int primary key not null, j int);
26
27drop table if exists tbl2;
28create table IF NOT EXISTS tbl2 (
29  colbit bit(9),
30  coltinyint tinyint,
31  colsmallint smallint default 55,
32  colmediumint mediumint,
33  colint int primary key not null,
34  colinteger integer,
35  colbigint bigint,
36  colreal real,
37  coldouble double,
38  colfloat float,
39  coldecimal decimal(12,2),
40  colnumeric numeric,
41
42  coltinyintunsigned tinyint unsigned,
43  colsmallintunsigned smallint unsigned,
44  colmediumintunsigned mediumint unsigned,
45  colintunsigned int unsigned,
46  colintegerunsigned integer unsigned,
47  colbigintunsigned bigint unsigned,
48  colrealunsigned real unsigned,
49  coldoubleunsigned double unsigned,
50  colfloatunsigned float unsigned,
51  coldecimalunsigned decimal unsigned,
52  colnumericunsigned numeric unsigned,
53
54  coldate date,
55  coltime time,
56  coltimestamp timestamp,
57  colyear year,
58
59  colchar char(12) collate latin1_spanish_ci,
60  colvarchar varchar(16) collate big5_chinese_ci,
61  colbinary binary(22),
62  colvarbinary varbinary(28),
63  coltinyblob tinyblob,
64  colblob blob,
65  colmediumblob mediumblob,
66  collongblob longblob,
67
68  coltinytext tinytext,
69  coltext text character set sjis collate sjis_bin,
70  colmediumtext mediumtext collate hebrew_general_ci,
71  collongtext longtext character set latin5,
72  unique key idxcoltinyintusinghash (coltinyint) using hash,
73  unique key idxcolsmallintboth (colsmallint),
74  key idxcolintunsignedcoldateusingbtree (colintunsigned, coldate)
75  );
76
77drop table if exists tbl3;
78create table IF NOT EXISTS tbl3 (
79  i int primary key not null,
80  c varchar(120)
81  );
82
83drop table if exists tbl4;
84create table IF NOT EXISTS tbl4 (
85  i int primary key not null default 1000,
86  k int,
87  c varchar(120),
88  unique key (k)
89  );
90