## -*-Mode: text; tab-width: 4; c-basic-offset: 4;-*-
## vi:set ts=4 sw=4:
##
## xxxx.txt -- 複数セッションで Schema 情報が見れる
##
##	TEST CONTENTS
##		複数セッションで Schema 情報が見れる
##
##	START CONDITIONS
##		特に無し
##		
##	END CONDITIONS
##		satart 前と同じ状態である
##
##	CHECK
##		途中に出力される select 文の結果が正しいか
##
##	NOTE
##		シングルスレッド
##		正常系
##		Schema の単体テストも兼ねる
##
## Copyright (c) 2001 Ricoh Company, Ltd.
## All rights reserved.
##
##		$Author$
##		$Date$
##		$Revision$
##

Begin;
Initialize;

InitializeSession "";
Command "create database DB_xxxx";
TerminateSession;

InitializeSession 0 "DB_xxxx";
InitializeSession 1 "DB_xxxx";

#transactionの外側でないとcreate tableはできない(伊戸川)
Command 0 "create table T(A int)";

Command 0 "start transaction read write";
Command 1 "start transaction read only, using snapshot";

# T は無いはず
Command 1 "select count(*) from T";

Command 0 "insert T(A) values (1)";
Command 0 "insert T(A) values (2)";

Command 0 "commit";

TerminateSession 0;

# T は見えるはず
Command 1 "select count(*) from T";

#Command 1 "drop database DB_xxxx";

TerminateSession 1;

#下三行は伊戸川が追加
InitializeSession "";
Command "drop database DB_xxxx";
TerminateSession;
Terminate;
End;
