# delayed, sectionized の全文に対して、select * from system_file を実行する
Begin;
Initialize;
# テスト用のDBを作る
InitializeSession "";
Command "create database TESTDB";
TerminateSession;

InitializeSession "TESTDB";
Command  "create table T1(C1 ntext array [no limit])";
Command  "create fulltext index I1_1 on T1(C1) hint 'sectionized, delayed ,inverted=(nolocation=true)'";
Command  "create table T2(C1 ntext array [no limit])";
Command  "create fulltext index I2_1 on T2(C1) hint 'sectionized, delayed ,inverted=(nolocation=true)'";

# SQLコマンドinsertをテストする
Command  "insert into T1 (C1) values (?)" [[textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\ricoh.txt"]];
Command  "insert into T1 (C1) values (?)" [[textsjisfile "..\\..\\doc\\ricoh.txt", textsjisfile "..\\..\\doc\\hello.txt"]];
# 複数タプルをまとめてinsert
Command  "insert into T2 (C1) values (?), (?)" [[textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\Teihon.txt"], [textsjisfile "..\\..\\doc\\Teihon.txt", textsjisfile "..\\..\\doc\\hello.txt"]];
# 他のtableからinsert...select
Command  "insert into T1 select C1 from T2 where C1=?" [[textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\Teihon.txt"]];
# 自分自身にinsert...select
Command  "insert into T1 select C1 from T1 where C1=?" [[textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\ricoh.txt"]];

Command  "select * from system_file";

Command  "drop table T1";
Command  "drop table T2";

TerminateSession;
# DBの後始末
InitializeSession "";
Command "drop database TESTDB";
TerminateSession;
Terminate;
End;
