# insert[1]/fulltext(sectionized)/heap
Begin;
BeginTimeSpan;
Initialize;
EndTimeSpan;
# テスト用のDBを作る
InitializeSession "";
Command "create database TESTDB";
TerminateSession;

InitializeSession "TESTDB";
Command  "create table T1(C1 ntext array [no limit] hint heap)";
Command  "create fulltext index I1_1 on T1(C1) hint 'sectionized ,inverted=(nolocation=true, notf=true)'";
Command  "create table T2(C1 ntext array [no limit] hint heap)";
Command  "create fulltext index I2_1 on T2(C1) hint 'sectionized ,inverted=(nolocation=true, notf=true)'";
Command  "select C1 from T1";
# 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 C1 from T1";
#Command  "drop table T1";
#Command  "drop table T2";

Command  "select * from T1";
Command  "select * from T2";

TerminateSession;
# DBの後始末
#InitializeSession "";
#Command "drop database TESTDB";
#TerminateSession;
# (障害回復を試すためTerminateしない)
End;
