create database if not exists dml;
drop table if exists bug3040a;
drop table if exists bug3040b;
drop table if exists bug3040c;
drop table if exists bug3040d;

Create table bug3040a (
CBIGINT         BIGINT,
CDECIMAL1       DECIMAL(1),
CDECIMAL4       DECIMAL(4),
CDECIMAL4_2     DECIMAL(4,2),
CDECIMAL5       DECIMAL(5),
CDECIMAL9       DECIMAL(9),
CDECIMAL9_2     DECIMAL(9,2),
CDECIMAL10      DECIMAL(10),
CDECIMAL18      DECIMAL(18),
CDECIMAL18_2    DECIMAL(18,2),
CINTEGER        INTEGER,
CSMALLINT       SMALLINT,
CTINYINT        TINYINT,
CDOUBLE         DOUBLE,
CFLOAT          FLOAT,
CDATE           DATE,
CDATETIME       DATETIME,
CCHAR1  CHAR(1),
CCHAR2  CHAR(2),
CCHAR3  CHAR(3),
CCHAR4  CHAR(4),
CCHAR5  CHAR(5),
CCHAR6  CHAR(6),
CCHAR7  CHAR(7),
CCHAR8  CHAR(8),
CCHAR9  CHAR(9),
CCHAR255        CHAR(255),
CVCHAR1         VARCHAR(1),
CVCHAR2         VARCHAR(2),
CVCHAR3         VARCHAR(3),
CVCHAR4         VARCHAR(4),
CVCHAR5         VARCHAR(5),
CVCHAR6         VARCHAR(6),
CVCHAR7         VARCHAR(7),
CVCHAR8         VARCHAR(8),
CVCHAR255       VARCHAR(255)
)engine=Infinidb;

Create table bug3040b (
CBIGINT         BIGINT,
CDECIMAL1       DECIMAL(1),
CDECIMAL4       DECIMAL(4),
CDECIMAL4_2     DECIMAL(4,2),
CDECIMAL5       DECIMAL(5),
CDECIMAL9       DECIMAL(9),
CDECIMAL9_2     DECIMAL(9,2),
CDECIMAL10      DECIMAL(10),
CDECIMAL18      DECIMAL(18),
CDECIMAL18_2    DECIMAL(18,2),
CINTEGER        INTEGER,
CSMALLINT       SMALLINT,
CTINYINT        TINYINT,
CDOUBLE         DOUBLE,
CFLOAT          FLOAT,
CDATE           DATE,
CDATETIME       DATETIME,
CCHAR1  CHAR(1),
CCHAR2  CHAR(2),
CCHAR3  CHAR(3),
CCHAR4  CHAR(4),
CCHAR5  CHAR(5),
CCHAR6  CHAR(6),
CCHAR7  CHAR(7),
CCHAR8  CHAR(8),
CCHAR9  CHAR(9),
CCHAR255        CHAR(255),
CVCHAR1         VARCHAR(1),
CVCHAR2         VARCHAR(2),
CVCHAR3         VARCHAR(3),
CVCHAR4         VARCHAR(4),
CVCHAR5         VARCHAR(5),
CVCHAR6         VARCHAR(6),
CVCHAR7         VARCHAR(7),
CVCHAR8         VARCHAR(8),
CVCHAR255       VARCHAR(255)
)engine=Infinidb;

Create table bug3040c (
CBIGINT         BIGINT,
CDECIMAL1       DECIMAL(1),
CDECIMAL4       DECIMAL(4),
CDECIMAL4_2     DECIMAL(4,2),
CDECIMAL5       DECIMAL(5),
CDECIMAL9       DECIMAL(9),
CDECIMAL9_2     DECIMAL(9,2),
CDECIMAL10      DECIMAL(10),
CDECIMAL18      DECIMAL(18),
CDECIMAL18_2    DECIMAL(18,2),
CINTEGER        INTEGER,
CSMALLINT       SMALLINT,
CTINYINT        TINYINT,
CDOUBLE         DOUBLE,
CFLOAT          FLOAT,
CDATE           DATE,
CDATETIME       DATETIME,
CCHAR1  CHAR(1),
CCHAR2  CHAR(2),
CCHAR3  CHAR(3),
CCHAR4  CHAR(4),
CCHAR5  CHAR(5),
CCHAR6  CHAR(6),
CCHAR7  CHAR(7),
CCHAR8  CHAR(8),
CCHAR9  CHAR(9),
CCHAR255        CHAR(255),
CVCHAR1         VARCHAR(1),
CVCHAR2         VARCHAR(2),
CVCHAR3         VARCHAR(3),
CVCHAR4         VARCHAR(4),
CVCHAR5         VARCHAR(5),
CVCHAR6         VARCHAR(6),
CVCHAR7         VARCHAR(7),
CVCHAR8         VARCHAR(8),
CVCHAR255       VARCHAR(255)
)engine=Infinidb;

create table bug3040d (
c1  char(1),
vc1 varchar(1),
c2  char(2),
vc2 varchar(2),
c3  char(3),
vc3 varchar(3),
c4  char(4),
vc4 varchar(4),
c5  char(5),
vc5 varchar(5),
c6  char(6),
vc6 varchar(6),
c7  char(7),
vc7 varchar(7),
c8  char(8),
vc8 varchar(8),
c9  char(9),
vc9 varchar(9)
)engine=infinidb;
