# delete[2]/fulltext(delayed)
Begin;
Initialize;
# テスト用のDBを作る
InitializeSession "";
Command "create database TESTDB";
TerminateSession;

InitializeSession "TESTDB";
Command  "create table T1(C1 ntext, C2 fulltext)";
Command  "create fulltext index I1_1 on T1(C1) hint 'delayed ,inverted=(nolocation=true, notf=true)'";
Command  "create fulltext index I1_2 on T1(C2) hint 'delayed ,inverted=(nolocation=true, notf=true)'";
Command  "select C1, C2 from T1";
# 2タプル挿入する
Command  "insert into T1 (C1, C2) values (?, ?), (?, ?)" [textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\kenpou.txt", textsjisfile "..\\..\\doc\\ricoh.txt", textsjisfile "..\\..\\doc\\rasyoumon.txt"];
# 1つずつ消す
Command  "delete from T1 where C1=? and C2=?" [textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\kenpou.txt"];
Command  "delete from T1 where C1=? and C2=?" [textsjisfile "..\\..\\doc\\ricoh.txt", textsjisfile "..\\..\\doc\\rasyoumon.txt"];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1, C2 from T1";
Command  "drop table T1";

Command  "create table T1(C1 ntext array [no limit], C2 fulltext array [no limit])";
Command  "create fulltext index I1_1 on T1(C1) hint 'delayed ,inverted=(nolocation=true, notf=true)'";
Command  "create fulltext index I1_2 on T1(C2) hint 'delayed ,inverted=(nolocation=true, notf=true)'";
Command  "select C1, C2 from T1";
# 2タプル挿入する
Command  "insert into T1 (C1, C2) values (?, ?), (?, ?)" [[textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\ricoh.txt"], [textsjisfile "..\\..\\doc\\kenpou.txt", textsjisfile "..\\..\\doc\\rasyoumon.txt"], [textsjisfile "..\\..\\doc\\ricoh.txt", textsjisfile "..\\..\\doc\\hello.txt"], [textsjisfile "..\\..\\doc\\rasyoumon.txt", textsjisfile "..\\..\\doc\\kenpou.txt"]];
# 1つずつ消す
Command  "delete from T1 where C1=? and C2=?" [[textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\ricoh.txt"], [textsjisfile "..\\..\\doc\\kenpou.txt", textsjisfile "..\\..\\doc\\rasyoumon.txt"]];
Command  "delete from T1 where C1=? and C2=?" [[textsjisfile "..\\..\\doc\\ricoh.txt", textsjisfile "..\\..\\doc\\hello.txt"], [textsjisfile "..\\..\\doc\\rasyoumon.txt", textsjisfile "..\\..\\doc\\kenpou.txt"]];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1, C2 from T1";
Command  "drop table T1";

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