# delete[1]/record/heap
Begin;
Initialize;
# テスト用のDBを作る
InitializeSession "";
Command "create database TESTDB";
TerminateSession;

InitializeSession "TESTDB";
Command  "create table #1(C1 nvarchar(32) hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" ["ほげ", "ホゲ"];
# 1つずつ消す
Command  "delete from #1 where C1=?" ["ほげ"];
Command  "delete from #1 where C1=?" ["ホゲ"];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 nvarchar(32) array [no limit] hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [["ほげ", "ホゲ"], ["ホゲ", "ほげ"]];
# 1つずつ消す
Command  "delete from #1 where C1=?" [["ほげ", "ホゲ"]];
Command  "delete from #1 where C1=?" [["ホゲ", "ほげ"]];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 ntext hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\ricoh.txt"];
# 1つずつ消す
Command  "delete from #1 where C1=?" [textsjisfile "..\\..\\doc\\hello.txt"];
Command  "delete from #1 where C1=?" [textsjisfile "..\\..\\doc\\ricoh.txt"];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 ntext array [no limit] hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [[textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\ricoh.txt"], [textsjisfile "..\\..\\doc\\ricoh.txt", textsjisfile "..\\..\\doc\\hello.txt"]];
# 1つずつ消す
Command  "delete from #1 where C1=?" [[textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\ricoh.txt"]];
Command  "delete from #1 where C1=?" [[textsjisfile "..\\..\\doc\\ricoh.txt", textsjisfile "..\\..\\doc\\hello.txt"]];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 fulltext hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [textsjisfile "..\\..\\doc\\kenpou.txt", textsjisfile "..\\..\\doc\\rasyoumon.txt"];
# 1つずつ消す
Command  "delete from #1 where C1=?" [textsjisfile "..\\..\\doc\\kenpou.txt"];
Command  "delete from #1 where C1=?" [textsjisfile "..\\..\\doc\\rasyoumon.txt"];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 fulltext array [no limit] hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [[textsjisfile "..\\..\\doc\\kenpou.txt", textsjisfile "..\\..\\doc\\rasyoumon.txt"], [textsjisfile "..\\..\\doc\\rasyoumon.txt", textsjisfile "..\\..\\doc\\kenpou.txt"]];
# 1つずつ消す
Command  "delete from #1 where C1=?" [[textsjisfile "..\\..\\doc\\kenpou.txt", textsjisfile "..\\..\\doc\\rasyoumon.txt"]];
Command  "delete from #1 where C1=?" [[textsjisfile "..\\..\\doc\\rasyoumon.txt", textsjisfile "..\\..\\doc\\kenpou.txt"]];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 int hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [777, 555];
# 1つずつ消す
Command  "delete from #1 where C1=?" [777];
Command  "delete from #1 where C1=?" [555];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 int array [no limit] hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [[777, 555], [555, 777]];
# 1つずつ消す
Command  "delete from #1 where C1=?" [[777, 555]];
Command  "delete from #1 where C1=?" [[555, 777]];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 float hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [3.141592, 2.718281];
# 1つずつ消す
Command  "delete from #1 where C1=?" [3.141592];
Command  "delete from #1 where C1=?" [2.718281];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 float array [no limit] hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [[3.141592, 2.718281], [2.718281, 3.141592]];
# 1つずつ消す
Command  "delete from #1 where C1=?" [[3.141592, 2.718281]];
Command  "delete from #1 where C1=?" [[2.718281, 3.141592]];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 datetime hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [time "2001-07-07 12:34:56.789", time "2001-09-09 00:00:00.000"];
# 1つずつ消す
Command  "delete from #1 where C1=?" [time "2001-07-07 12:34:56.789"];
Command  "delete from #1 where C1=?" [time "2001-09-09 00:00:00.000"];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 datetime array [no limit] hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [[time "2001-07-07 12:34:56.789", time "2001-09-09 00:00:00.000"], [time "2001-09-09 00:00:00.000", time "2001-07-07 12:34:56.789"]];
# 1つずつ消す
Command  "delete from #1 where C1=?" [[time "2001-07-07 12:34:56.789", time "2001-09-09 00:00:00.000"]];
Command  "delete from #1 where C1=?" [[time "2001-09-09 00:00:00.000", time "2001-07-07 12:34:56.789"]];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 image hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [binaryfile "..\\..\\doc\\rnd10k", binaryfile "..\\..\\doc\\rnd20k"];
# 1つずつ消す
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 image array [no limit] hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [[binaryfile "..\\..\\doc\\rnd10k", binaryfile "..\\..\\doc\\rnd20k"], [binaryfile "..\\..\\doc\\rnd20k", binaryfile "..\\..\\doc\\rnd10k"]];
# 1つずつ消す
Command  "delete from #1 where C1=?" [[binaryfile "..\\..\\doc\\rnd10k", binaryfile "..\\..\\doc\\rnd20k"]];
Command  "delete from #1 where C1=?" [[binaryfile "..\\..\\doc\\rnd20k", binaryfile "..\\..\\doc\\rnd10k"]];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 nvarchar(32) hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [null, "ホゲ"];
# 1つずつ消す
Command  "delete from #1 where C1 is null" [];
Command  "delete from #1 where C1=?" ["ホゲ"];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 nvarchar(32) array [no limit] hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [[null, "ほげ"], ["ホゲ", "ほげ"]];
# 1つずつ消す
Command  "delete from #1 where C1=?" [[null, "ほげ"]];
Command  "delete from #1 where C1=?" [["ホゲ", "ほげ"]];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 ntext hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [null, textsjisfile "..\\..\\doc\\ricoh.txt"];
# 1つずつ消す
Command  "delete from #1 where C1 is null" [];
Command  "delete from #1 where C1=?" [textsjisfile "..\\..\\doc\\ricoh.txt"];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 ntext array [no limit] hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [[null, textsjisfile "..\\..\\doc\\hello.txt"], [textsjisfile "..\\..\\doc\\ricoh.txt", textsjisfile "..\\..\\doc\\hello.txt"]];
# 1つずつ消す
Command  "delete from #1 where C1=?" [[null, textsjisfile "..\\..\\doc\\hello.txt"]];
Command  "delete from #1 where C1=?" [[textsjisfile "..\\..\\doc\\ricoh.txt", textsjisfile "..\\..\\doc\\hello.txt"]];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 fulltext hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [null, textsjisfile "..\\..\\doc\\rasyoumon.txt"];
# 1つずつ消す
Command  "delete from #1 where C1 is null" [];
Command  "delete from #1 where C1=?" [textsjisfile "..\\..\\doc\\rasyoumon.txt"];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 fulltext array [no limit] hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [[null, textsjisfile "..\\..\\doc\\kenpou.txt"], [textsjisfile "..\\..\\doc\\rasyoumon.txt", textsjisfile "..\\..\\doc\\kenpou.txt"]];
# 1つずつ消す
Command  "delete from #1 where C1=?" [[null, textsjisfile "..\\..\\doc\\kenpou.txt"]];
Command  "delete from #1 where C1=?" [[textsjisfile "..\\..\\doc\\rasyoumon.txt", textsjisfile "..\\..\\doc\\kenpou.txt"]];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 int hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [null, 555];
# 1つずつ消す
Command  "delete from #1 where C1 is null" [];
Command  "delete from #1 where C1=?" [555];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 int array [no limit] hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [[null, 777], [555, 777]];
# 1つずつ消す
Command  "delete from #1 where C1=?" [[null, 777]];
Command  "delete from #1 where C1=?" [[555, 777]];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 float hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [null, 2.718281];
# 1つずつ消す
Command  "delete from #1 where C1 is null" [];
Command  "delete from #1 where C1=?" [2.718281];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 float array [no limit] hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [[null, 3.141592], [2.718281, 3.141592]];
# 1つずつ消す
Command  "delete from #1 where C1=?" [[null, 3.141592]];
Command  "delete from #1 where C1=?" [[2.718281, 3.141592]];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 datetime hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [null, time "2001-09-09 00:00:00.000"];
# 1つずつ消す
Command  "delete from #1 where C1 is null" [];
Command  "delete from #1 where C1=?" [time "2001-09-09 00:00:00.000"];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 datetime array [no limit] hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [[null, time "2001-07-07 12:34:56.789"], [time "2001-09-09 00:00:00.000", time "2001-07-07 12:34:56.789"]];
# 1つずつ消す
Command  "delete from #1 where C1=?" [[null, time "2001-07-07 12:34:56.789"]];
Command  "delete from #1 where C1=?" [[time "2001-09-09 00:00:00.000", time "2001-07-07 12:34:56.789"]];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 image hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [null, binaryfile "..\\..\\doc\\rnd20k"];
# 1つずつ消す
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 image array [no limit] hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [[null, binaryfile "..\\..\\doc\\rnd10k"], [binaryfile "..\\..\\doc\\rnd20k", binaryfile "..\\..\\doc\\rnd10k"]];
# 1つずつ消す
Command  "delete from #1 where C1=?" [[null, binaryfile "..\\..\\doc\\rnd10k"]];
Command  "delete from #1 where C1=?" [[binaryfile "..\\..\\doc\\rnd20k", binaryfile "..\\..\\doc\\rnd10k"]];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 nvarchar(32) hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" ["ほげ", null];
# 1つずつ消す
Command  "delete from #1 where C1=?" ["ほげ"];
Command  "delete from #1 where C1 is null" [];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 nvarchar(32) array [no limit] hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [["ほげ", "ホゲ"], ["ほげ", null]];
# 1つずつ消す
Command  "delete from #1 where C1=?" [["ほげ", "ホゲ"]];
Command  "delete from #1 where C1=?" [["ほげ", null]];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 ntext hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [textsjisfile "..\\..\\doc\\hello.txt", null];
# 1つずつ消す
Command  "delete from #1 where C1=?" [textsjisfile "..\\..\\doc\\hello.txt"];
Command  "delete from #1 where C1 is null" [];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 ntext array [no limit] hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [[textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\ricoh.txt"], [textsjisfile "..\\..\\doc\\hello.txt", null]];
# 1つずつ消す
Command  "delete from #1 where C1=?" [[textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\ricoh.txt"]];
Command  "delete from #1 where C1=?" [[textsjisfile "..\\..\\doc\\hello.txt", null]];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 fulltext hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [textsjisfile "..\\..\\doc\\kenpou.txt", null];
# 1つずつ消す
Command  "delete from #1 where C1=?" [textsjisfile "..\\..\\doc\\kenpou.txt"];
Command  "delete from #1 where C1 is null" [];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 fulltext array [no limit] hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [[textsjisfile "..\\..\\doc\\kenpou.txt", textsjisfile "..\\..\\doc\\rasyoumon.txt"], [textsjisfile "..\\..\\doc\\kenpou.txt", null]];
# 1つずつ消す
Command  "delete from #1 where C1=?" [[textsjisfile "..\\..\\doc\\kenpou.txt", textsjisfile "..\\..\\doc\\rasyoumon.txt"]];
Command  "delete from #1 where C1=?" [[textsjisfile "..\\..\\doc\\kenpou.txt", null]];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 int hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [777, null];
# 1つずつ消す
Command  "delete from #1 where C1=?" [777];
Command  "delete from #1 where C1 is null" [];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 int array [no limit] hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [[777, 555], [777, null]];
# 1つずつ消す
Command  "delete from #1 where C1=?" [[777, 555]];
Command  "delete from #1 where C1=?" [[777, null]];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 float hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [3.141592, null];
# 1つずつ消す
Command  "delete from #1 where C1=?" [3.141592];
Command  "delete from #1 where C1 is null" [];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 float array [no limit] hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [[3.141592, 2.718281], [3.141592, null]];
# 1つずつ消す
Command  "delete from #1 where C1=?" [[3.141592, 2.718281]];
Command  "delete from #1 where C1=?" [[3.141592, null]];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 datetime hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [time "2001-07-07 12:34:56.789", null];
# 1つずつ消す
Command  "delete from #1 where C1=?" [time "2001-07-07 12:34:56.789"];
Command  "delete from #1 where C1 is null" [];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 datetime array [no limit] hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [[time "2001-07-07 12:34:56.789", time "2001-09-09 00:00:00.000"], [time "2001-07-07 12:34:56.789", null]];
# 1つずつ消す
Command  "delete from #1 where C1=?" [[time "2001-07-07 12:34:56.789", time "2001-09-09 00:00:00.000"]];
Command  "delete from #1 where C1=?" [[time "2001-07-07 12:34:56.789", null]];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 image hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [binaryfile "..\\..\\doc\\rnd10k", null];
# 1つずつ消す
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

Command  "create table #1(C1 image array [no limit] hint heap)";
Command  "select C1 from #1";
# 2タプル挿入する
Command  "insert into #1 (C1) values (?), (?)" [[binaryfile "..\\..\\doc\\rnd10k", binaryfile "..\\..\\doc\\rnd20k"], [binaryfile "..\\..\\doc\\rnd10k", null]];
# 1つずつ消す
Command  "delete from #1 where C1=?" [[binaryfile "..\\..\\doc\\rnd10k", binaryfile "..\\..\\doc\\rnd20k"]];
Command  "delete from #1 where C1=?" [[binaryfile "..\\..\\doc\\rnd10k", null]];
# 正常にいけば浮ヘ空になっているはず
Command  "select C1 from #1";
Command  "drop table #1";

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