# Skip Purify BoundsChecker

Begin;
Initialize;
InitializeSession "TESTDB";
Command "create database TESTDB";
TerminateSession;
InitializeSession "TESTDB";
#
# B+木の大量データテスト -- 複合索引・6列 NULLを大量挿入
#

Command "create table T(c1 float, c2 datetime, c3 nchar(14), c4 nvarchar(14) hint nontruncate, c5 int, c6 datetime)";
Command "insert into T values ((null), (null), (null), (null), (null), (null))";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "select count(*) from T";
Command "create index I on T(c1, c2, c3, c4, c5, c6)";
BeginTimeSpan;
Command "verify index I cascade continue";
EndTimeSpan;
Command "select min(c1) from T";
Command "select max(c1) from T";
Command "select min(c1), max(c1) from T";
Command "insert into T values (3.141591, '2007-12-31 00:00:00.000', 'Zaandam', 'Zaandam', 1, '2007-12-31 00:00:00.000')";
Command "select min(c1) from T";
Command "select max(c1) from T";
Command "select min(c1), max(c1) from T";
Command "update T set c1 = (null), c2 = (null), c3 = (null), c4 = (null), c5 = (null), c6 = (null) where c1 is not null and c2 is not null and c3 is not null and c4 is not null and c5 is not null and c6 is not null";
Command "insert into T values (3.665877, '2037-11-25 15:00:00.000', 'Zabaean', 'Zabaean', 524287, '2037-11-25 15:00:00.000')";
Command "update T set c1 = 4.190167, c2 = '2067-10-24 07:00:00.000', c3 = 'zabaglione', c4 = 'zabaglione', c5 = 1048577, c6 = '2067-10-24 07:00:00.000' where c1 is not null and c2 is not null and c3 is not null and c4 is not null and c5 is not null and c6 is not null";
Command "delete from T where c1 is not null and c2 is not null and c3 is not null and c4 is not null and c5 is not null and c6 is not null";
BeginTimeSpan;
Command "verify index I cascade continue";
EndTimeSpan;
Command "delete from T where c1 is null and c2 is null and c3 is null and c4 is null and c5 is null and c6 is null";
BeginTimeSpan;
Command "verify index I cascade continue";
EndTimeSpan;
Command "drop index I";
Command "drop table T";

Command "create table T(c1 datetime, c2 datetime, c3 nvarchar(14), c4 float, c5 varchar(14), c6 decimal(10,4))";
Command "insert into T values ((null), (null), (null), (null), (null), (null))";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "insert into T select * from T";
Command "select count(*) from T";
Command "create all rows index I on T(c1, c2, c3, c4, c5, c6)";
Command "verify index I cascade continue";
Command "select min(c1) from T";
Command "select max(c1) from T";
Command "select min(c1), max(c1) from T";
Command "insert into T values ('2007-12-31 00:00:00.000', '2007-12-31 00:00:00.000', 'Zaandam', 3.141591, 'Zaandam', 0.01)";
Command "select min(c1) from T";
Command "select max(c1) from T";
Command "select min(c1), max(c1) from T";
Command "update T set c1 = (null), c2 = (null), c3 = (null), c4 = (null), c5 = (null), c6 = (null) where c1 is not null and c2 is not null and c3 is not null and c4 is not null and c5 is not null and c6 is not null";
Command "insert into T values ('2037-11-25 15:00:00.000', '2037-11-25 15:00:00.000', 'Zabaean', 3.665877, 'Zabaean', 5242.87)";
Command "update T set c1 = '2067-10-24 07:00:00.000', c2 = '2067-10-24 07:00:00.000', c3 = 'zabaglione', c4 = 4.190167, c5 = 'zabaglione', c6 = 10485.77 where c1 is not null and c2 is not null and c3 is not null and c4 is not null and c5 is not null and c6 is not null";
Command "delete from T where c1 is not null and c2 is not null and c3 is not null and c4 is not null and c5 is not null and c6 is not null";
Command "verify index I cascade continue";
Command "delete from T where c1 is null and c2 is null and c3 is null and c4 is null and c5 is null and c6 is null";
Command "verify index I cascade continue";
Command "drop index I";
Command "drop table T";

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