# 障害票 No.1060に対応
# B+木索引でis null検索を使うと実行に失敗することがある。
#
Begin;
Initialize;
InitializeSession "TESTDB";
Command "create database TESTDB";
TerminateSession;
InitializeSession "TESTDB";

# fetch --------------------------------------------------
# B+木, 非配列, 複合, 制約なし, fetch, char
Command "create table T(c1 int, c2 char(4))";
Command "create index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

Command "create table T(c1 int, c2 char(4))";
Command "create index I on T(c2, c1)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# B+木, 非配列, 複合, 制約なし, fetch, varchar
Command "create table T(c1 int, c2 varchar(4))";
Command "create index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

Command "create table T(c1 int, c2 varchar(4))";
Command "create index I on T(c2, c1)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# B+木, 非配列, 複合, 制約なし, fetch, nchar
Command "create table T(c1 int, c2 nchar(4))";
Command "create index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

Command "create table T(c1 int, c2 nchar(4))";
Command "create index I on T(c2, c1)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# B+木, 非配列, 複合, 制約なし, fetch, nvarchar
Command "create table T(c1 int, c2 nvarchar(4))";
Command "create index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

Command "create table T(c1 int, c2 nvarchar(4))";
Command "create index I on T(c2, c1)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# B+木, 非配列, 複合, 制約なし, fetch, int
Command "create table T(c1 int, c2 int)";
Command "create index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

Command "create table T(c1 int, c2 int)";
Command "create index I on T(c2, c1)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# B+木, 非配列, 複合, 制約なし, fetch, bigint
Command "create table T(c1 int, c2 bigint)";
Command "create index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

Command "create table T(c1 int, c2 bigint)";
Command "create index I on T(c2, c1)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# B+木, 非配列, 複合, 制約なし, fetch, float
Command "create table T(c1 int, c2 float)";
Command "create index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

Command "create table T(c1 int, c2 float)";
Command "create index I on T(c2, c1)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# B+木, 非配列, 複合, 制約なし, fetch, datetime
Command "create table T(c1 int, c2 datetime)";
Command "create index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

Command "create table T(c1 int, c2 datetime)";
Command "create index I on T(c2, c1)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# B+木, 非配列, 複合, 制約なし, fetch, language
Command "create table T(c1 int, c2 language)";
Command "create index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

Command "create table T(c1 int, c2 language)";
Command "create index I on T(c2, c1)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# B+木, 非配列, 複合, 制約なし, fetch, decimal
Command "create table T(c1 int, c2 decimal)";
Command "create index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

Command "create table T(c1 int, c2 decimal)";
Command "create index I on T(c2, c1)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# ALL ROWS, 非配列, 複合, 制約なし, fetch, char
Command "create table T(c1 int, c2 char(4))";
Command "create all rows index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

Command "create table T(c1 int, c2 char(4))";
Command "create all rows index I on T(c2, c1)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# ALL ROWS, 非配列, 複合, 制約なし, fetch, varchar
Command "create table T(c1 int, c2 varchar(4))";
Command "create all rows index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

Command "create table T(c1 int, c2 varchar(4))";
Command "create all rows index I on T(c2, c1)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# ALL ROWS, 非配列, 複合, 制約なし, fetch, nchar
Command "create table T(c1 int, c2 nchar(4))";
Command "create all rows index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

Command "create table T(c1 int, c2 nchar(4))";
Command "create all rows index I on T(c2, c1)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# ALL ROWS, 非配列, 複合, 制約なし, fetch, nvarchar
Command "create table T(c1 int, c2 nvarchar(4))";
Command "create all rows index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

Command "create table T(c1 int, c2 nvarchar(4))";
Command "create all rows index I on T(c2, c1)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# ALL ROWS, 非配列, 複合, 制約なし, fetch, int
Command "create table T(c1 int, c2 int)";
Command "create all rows index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

Command "create table T(c1 int, c2 int)";
Command "create all rows index I on T(c2, c1)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# ALL ROWS, 非配列, 複合, 制約なし, fetch, bigint
Command "create table T(c1 int, c2 bigint)";
Command "create all rows index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

Command "create table T(c1 int, c2 bigint)";
Command "create all rows index I on T(c2, c1)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# ALL ROWS, 非配列, 複合, 制約なし, fetch, float
Command "create table T(c1 int, c2 float)";
Command "create all rows index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

Command "create table T(c1 int, c2 float)";
Command "create all rows index I on T(c2, c1)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# ALL ROWS, 非配列, 複合, 制約なし, fetch, datetime
Command "create table T(c1 int, c2 datetime)";
Command "create all rows index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

Command "create table T(c1 int, c2 datetime)";
Command "create all rows index I on T(c2, c1)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# ALL ROWS, 非配列, 複合, 制約なし, fetch, language
Command "create table T(c1 int, c2 language)";
Command "create all rows index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

Command "create table T(c1 int, c2 language)";
Command "create all rows index I on T(c2, c1)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# ALL ROWS, 非配列, 複合, 制約なし, fetch, decimal
Command "create table T(c1 int, c2 decimal)";
Command "create all rows index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

Command "create table T(c1 int, c2 decimal)";
Command "create all rows index I on T(c2, c1)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# B+木, 非配列, 複合, not null制約, fetch, char
Command "create table T(c1 int not null, c2 char(4))";
Command "create index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# B+木, 非配列, 複合, not null制約, fetch, varchar
Command "create table T(c1 int not null, c2 varchar(4))";
Command "create index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# B+木, 非配列, 複合, not null制約, fetch, nchar
Command "create table T(c1 int not null, c2 nchar(4))";
Command "create index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# B+木, 非配列, 複合, not null制約, fetch, nvarchar
Command "create table T(c1 int not null, c2 nvarchar(4))";
Command "create index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# B+木, 非配列, 複合, not null制約, fetch, int
Command "create table T(c1 int not null, c2 int)";
Command "create index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# B+木, 非配列, 複合, not null制約, fetch, bigint
Command "create table T(c1 int not null, c2 bigint)";
Command "create index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# B+木, 非配列, 複合, not null制約, fetch, float
Command "create table T(c1 int not null, c2 float)";
Command "create index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# B+木, 非配列, 複合, not null制約, fetch, datetime
Command "create table T(c1 int not null, c2 datetime)";
Command "create index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# B+木, 非配列, 複合, not null制約, fetch, language
Command "create table T(c1 int not null, c2 language)";
Command "create index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# B+木, 非配列, 複合, not null制約, fetch, decimal
Command "create table T(c1 int not null, c2 decimal)";
Command "create index I on T(c1, c2)";
Command "create table X(c1 int)";
Command "insert T values (1, (null))";
Command "insert X values 1";
Command "select * from T, X where T.c1 = X.c1 and (T.c1 = 1 and T.c2 is null)";
Command "drop table T";
Command "drop table X";

# 2列の複合索引 --------------------------------------------------
# B+木, 非配列, 複合, 制約なし, 2列, char
Command "create table T(c1 int, c2 char(4))";
Command "insert T values (1, (null))";
Command "create index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

Command "create table T(c1 int, c2 char(4))";
Command "insert T values (1, (null))";
Command "create index I on T(c2, c1)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# B+木, 非配列, 複合, 制約なし, 2列, varchar
Command "create table T(c1 int, c2 varchar(4))";
Command "insert T values (1, (null))";
Command "create index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

Command "create table T(c1 int, c2 varchar(4))";
Command "insert T values (1, (null))";
Command "create index I on T(c2, c1)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# B+木, 非配列, 複合, 制約なし, 2列, nchar
Command "create table T(c1 int, c2 nchar(4))";
Command "insert T values (1, (null))";
Command "create index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

Command "create table T(c1 int, c2 nchar(4))";
Command "insert T values (1, (null))";
Command "create index I on T(c2, c1)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# B+木, 非配列, 複合, 制約なし, 2列, nvarchar
Command "create table T(c1 int, c2 nvarchar(4))";
Command "insert T values (1, (null))";
Command "create index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

Command "create table T(c1 int, c2 nvarchar(4))";
Command "insert T values (1, (null))";
Command "create index I on T(c2, c1)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# B+木, 非配列, 複合, 制約なし, 2列, int
Command "create table T(c1 int, c2 int)";
Command "insert T values (1, (null))";
Command "create index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

Command "create table T(c1 int, c2 int)";
Command "insert T values (1, (null))";
Command "create index I on T(c2, c1)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# B+木, 非配列, 複合, 制約なし, 2列, bigint
Command "create table T(c1 int, c2 bigint)";
Command "insert T values (1, (null))";
Command "create index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

Command "create table T(c1 int, c2 bigint)";
Command "insert T values (1, (null))";
Command "create index I on T(c2, c1)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# B+木, 非配列, 複合, 制約なし, 2列, float
Command "create table T(c1 int, c2 float)";
Command "insert T values (1, (null))";
Command "create index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

Command "create table T(c1 int, c2 float)";
Command "insert T values (1, (null))";
Command "create index I on T(c2, c1)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# B+木, 非配列, 複合, 制約なし, 2列, datetime
Command "create table T(c1 int, c2 datetime)";
Command "insert T values (1, (null))";
Command "create index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

Command "create table T(c1 int, c2 datetime)";
Command "insert T values (1, (null))";
Command "create index I on T(c2, c1)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# B+木, 非配列, 複合, 制約なし, 2列, language
Command "create table T(c1 int, c2 language)";
Command "insert T values (1, (null))";
Command "create index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

Command "create table T(c1 int, c2 language)";
Command "insert T values (1, (null))";
Command "create index I on T(c2, c1)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# B+木, 非配列, 複合, 制約なし, 2列, decimal
Command "create table T(c1 int, c2 decimal)";
Command "insert T values (1, (null))";
Command "create index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

Command "create table T(c1 int, c2 decimal)";
Command "insert T values (1, (null))";
Command "create index I on T(c2, c1)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# ALL ROWS, 非配列, 複合, 制約なし, 2列, char
Command "create table T(c1 int, c2 char(4))";
Command "insert T values (1, (null))";
Command "create all rows index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

Command "create table T(c1 int, c2 char(4))";
Command "insert T values (1, (null))";
Command "create all rows index I on T(c2, c1)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# ALL ROWS, 非配列, 複合, 制約なし, 2列, varchar
Command "create table T(c1 int, c2 varchar(4))";
Command "insert T values (1, (null))";
Command "create all rows index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

Command "create table T(c1 int, c2 varchar(4))";
Command "insert T values (1, (null))";
Command "create all rows index I on T(c2, c1)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# ALL ROWS, 非配列, 複合, 制約なし, 2列, nchar
Command "create table T(c1 int, c2 nchar(4))";
Command "insert T values (1, (null))";
Command "create all rows index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

Command "create table T(c1 int, c2 nchar(4))";
Command "insert T values (1, (null))";
Command "create all rows index I on T(c2, c1)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# ALL ROWS, 非配列, 複合, 制約なし, 2列, nvarchar
Command "create table T(c1 int, c2 nvarchar(4))";
Command "insert T values (1, (null))";
Command "create all rows index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

Command "create table T(c1 int, c2 nvarchar(4))";
Command "insert T values (1, (null))";
Command "create all rows index I on T(c2, c1)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# ALL ROWS, 非配列, 複合, 制約なし, 2列, int
Command "create table T(c1 int, c2 int)";
Command "insert T values (1, (null))";
Command "create all rows index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

Command "create table T(c1 int, c2 int)";
Command "insert T values (1, (null))";
Command "create all rows index I on T(c2, c1)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# ALL ROWS, 非配列, 複合, 制約なし, 2列, bigint
Command "create table T(c1 int, c2 bigint)";
Command "insert T values (1, (null))";
Command "create all rows index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

Command "create table T(c1 int, c2 bigint)";
Command "insert T values (1, (null))";
Command "create all rows index I on T(c2, c1)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# ALL ROWS, 非配列, 複合, 制約なし, 2列, float
Command "create table T(c1 int, c2 float)";
Command "insert T values (1, (null))";
Command "create all rows index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

Command "create table T(c1 int, c2 float)";
Command "insert T values (1, (null))";
Command "create all rows index I on T(c2, c1)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# ALL ROWS, 非配列, 複合, 制約なし, 2列, datetime
Command "create table T(c1 int, c2 datetime)";
Command "insert T values (1, (null))";
Command "create all rows index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

Command "create table T(c1 int, c2 datetime)";
Command "insert T values (1, (null))";
Command "create all rows index I on T(c2, c1)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# ALL ROWS, 非配列, 複合, 制約なし, 2列, language
Command "create table T(c1 int, c2 language)";
Command "insert T values (1, (null))";
Command "create all rows index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

Command "create table T(c1 int, c2 language)";
Command "insert T values (1, (null))";
Command "create all rows index I on T(c2, c1)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# ALL ROWS, 非配列, 複合, 制約なし, 2列, decimal
Command "create table T(c1 int, c2 decimal)";
Command "insert T values (1, (null))";
Command "create all rows index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

Command "create table T(c1 int, c2 decimal)";
Command "insert T values (1, (null))";
Command "create all rows index I on T(c2, c1)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# B+木, 非配列, 複合, not null制約, 2列, char
Command "create table T(c1 int not null, c2 char(4))";
Command "insert T values (1, (null))";
Command "create index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# B+木, 非配列, 複合, not null制約, 2列, varchar
Command "create table T(c1 int not null, c2 varchar(4))";
Command "insert T values (1, (null))";
Command "create index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# B+木, 非配列, 複合, not null制約, 2列, nchar
Command "create table T(c1 int not null, c2 nchar(4))";
Command "insert T values (1, (null))";
Command "create index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# B+木, 非配列, 複合, not null制約, 2列, nvarchar
Command "create table T(c1 int not null, c2 nvarchar(4))";
Command "insert T values (1, (null))";
Command "create index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# B+木, 非配列, 複合, not null制約, 2列, int
Command "create table T(c1 int not null, c2 int)";
Command "insert T values (1, (null))";
Command "create index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# B+木, 非配列, 複合, not null制約, 2列, bigint
Command "create table T(c1 int not null, c2 bigint)";
Command "insert T values (1, (null))";
Command "create index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# B+木, 非配列, 複合, not null制約, 2列, float
Command "create table T(c1 int not null, c2 float)";
Command "insert T values (1, (null))";
Command "create index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# B+木, 非配列, 複合, not null制約, 2列, datetime
Command "create table T(c1 int not null, c2 datetime)";
Command "insert T values (1, (null))";
Command "create index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# B+木, 非配列, 複合, not null制約, 2列, language
Command "create table T(c1 int not null, c2 language)";
Command "insert T values (1, (null))";
Command "create index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# B+木, 非配列, 複合, not null制約, 2列, decimal
Command "create table T(c1 int not null, c2 decimal)";
Command "insert T values (1, (null))";
Command "create index I on T(c1, c2)";
Command "select * from T where c1 > 0 and c2 is null";
Command "drop table T";

# 3列の複合索引 --------------------------------------------------
# B+木, 非配列, 複合, 制約なし, 3列, char
Command "create table T(c1 int, c2 char(4), c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

Command "create table T(c1 int, c2 char(4), c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c2, c1, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# B+木, 非配列, 複合, 制約なし, 3列, varchar
Command "create table T(c1 int, c2 varchar(4), c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

Command "create table T(c1 int, c2 varchar(4), c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c2, c1, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# B+木, 非配列, 複合, 制約なし, 3列, nchar
Command "create table T(c1 int, c2 nchar(4), c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

Command "create table T(c1 int, c2 nchar(4), c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c2, c1, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# B+木, 非配列, 複合, 制約なし, 3列, nvarchar
Command "create table T(c1 int, c2 nvarchar(4), c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

Command "create table T(c1 int, c2 nvarchar(4), c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c2, c1, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# B+木, 非配列, 複合, 制約なし, 3列, int
Command "create table T(c1 int, c2 int, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

Command "create table T(c1 int, c2 int, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c2, c1, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# B+木, 非配列, 複合, 制約なし, 3列, bigint
Command "create table T(c1 int, c2 bigint, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

Command "create table T(c1 int, c2 bigint, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c2, c1, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# B+木, 非配列, 複合, 制約なし, 3列, float
Command "create table T(c1 int, c2 float, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

Command "create table T(c1 int, c2 float, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c2, c1, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# B+木, 非配列, 複合, 制約なし, 3列, datetime
Command "create table T(c1 int, c2 datetime, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

Command "create table T(c1 int, c2 datetime, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c2, c1, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# B+木, 非配列, 複合, 制約なし, 3列, language
Command "create table T(c1 int, c2 language, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

Command "create table T(c1 int, c2 language, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c2, c1, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# B+木, 非配列, 複合, 制約なし, 3列, decimal
Command "create table T(c1 int, c2 decimal, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

Command "create table T(c1 int, c2 decimal, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c2, c1, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# ALL ROWS, 非配列, 複合, 制約なし, 3列, char
Command "create table T(c1 int, c2 char(4), c3 int)";
Command "insert T values (1, (null), 1)";
Command "create all rows index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

Command "create table T(c1 int, c2 char(4), c3 int)";
Command "insert T values (1, (null), 1)";
Command "create all rows index I on T(c2, c1, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# ALL ROWS, 非配列, 複合, 制約なし, 3列, varchar
Command "create table T(c1 int, c2 varchar(4), c3 int)";
Command "insert T values (1, (null), 1)";
Command "create all rows index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

Command "create table T(c1 int, c2 varchar(4), c3 int)";
Command "insert T values (1, (null), 1)";
Command "create all rows index I on T(c2, c1, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# ALL ROWS, 非配列, 複合, 制約なし, 3列, nchar
Command "create table T(c1 int, c2 nchar(4), c3 int)";
Command "insert T values (1, (null), 1)";
Command "create all rows index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

Command "create table T(c1 int, c2 nchar(4), c3 int)";
Command "insert T values (1, (null), 1)";
Command "create all rows index I on T(c2, c1, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# ALL ROWS, 非配列, 複合, 制約なし, 3列, nvarchar
Command "create table T(c1 int, c2 nvarchar(4), c3 int)";
Command "insert T values (1, (null), 1)";
Command "create all rows index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

Command "create table T(c1 int, c2 nvarchar(4), c3 int)";
Command "insert T values (1, (null), 1)";
Command "create all rows index I on T(c2, c1, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# ALL ROWS, 非配列, 複合, 制約なし, 3列, int
Command "create table T(c1 int, c2 int, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create all rows index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

Command "create table T(c1 int, c2 int, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create all rows index I on T(c2, c1, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# ALL ROWS, 非配列, 複合, 制約なし, 3列, bigint
Command "create table T(c1 int, c2 bigint, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create all rows index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

Command "create table T(c1 int, c2 bigint, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create all rows index I on T(c2, c1, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# ALL ROWS, 非配列, 複合, 制約なし, 3列, float
Command "create table T(c1 int, c2 float, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create all rows index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

Command "create table T(c1 int, c2 float, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create all rows index I on T(c2, c1, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# ALL ROWS, 非配列, 複合, 制約なし, 3列, datetime
Command "create table T(c1 int, c2 datetime, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create all rows index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

Command "create table T(c1 int, c2 datetime, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create all rows index I on T(c2, c1, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# ALL ROWS, 非配列, 複合, 制約なし, 3列, language
Command "create table T(c1 int, c2 language, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create all rows index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

Command "create table T(c1 int, c2 language, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create all rows index I on T(c2, c1, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# ALL ROWS, 非配列, 複合, 制約なし, 3列, decimal
Command "create table T(c1 int, c2 decimal, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create all rows index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

Command "create table T(c1 int, c2 decimal, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create all rows index I on T(c2, c1, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# B+木, 非配列, 複合, not null制約, 3列, char
Command "create table T(c1 int not null, c2 char(4), c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# B+木, 非配列, 複合, not null制約, 3列, varchar
Command "create table T(c1 int not null, c2 varchar(4), c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# B+木, 非配列, 複合, not null制約, 3列, nchar
Command "create table T(c1 int not null, c2 nchar(4), c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# B+木, 非配列, 複合, not null制約, 3列, nvarchar
Command "create table T(c1 int not null, c2 nvarchar(4), c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# B+木, 非配列, 複合, not null制約, 3列, int
Command "create table T(c1 int not null, c2 int, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# B+木, 非配列, 複合, not null制約, 3列, bigint
Command "create table T(c1 int not null, c2 bigint, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# B+木, 非配列, 複合, not null制約, 3列, float
Command "create table T(c1 int not null, c2 float, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# B+木, 非配列, 複合, not null制約, 3列, datetime
Command "create table T(c1 int not null, c2 datetime, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# B+木, 非配列, 複合, not null制約, 3列, language
Command "create table T(c1 int not null, c2 language, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

# B+木, 非配列, 複合, not null制約, 3列, decimal
Command "create table T(c1 int not null, c2 decimal, c3 int)";
Command "insert T values (1, (null), 1)";
Command "create index I on T(c1, c2, c3)";
Command "select * from T where c1 = 1 and c2 is null and c3 >= 1";
Command "drop table T";

TerminateSession;
InitializeSession "TESTDB";
Command "drop database TESTDB";
TerminateSession;
Terminate;
End;
