Changeset: 7c00b0ebe58e for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7c00b0ebe58e Modified Files: sql/src/test/mserver5-sql-readonly/Tests/mserver5-sql-readonly-table.py Branch: default Log Message:
restored (re-added) file that got lost with " changeset: 37169:b0b2e3ae9928 parent: 37168:1962b598682b parent: 37155:ba2c312a006c user: m...@cwi.nl date: Thu Aug ^C 08:07:53 2010 +0200 summary: Merge with june " most probabaly because the original file added by Arjen (most probably not using the check_whitespace HG extension that we are "strongly urged" to use; cf., http://homepages.cwi.nl/~sjoerd/downloads/monetdb/MonetDB-Mercurial.html) contained trailing whitespace, and then Martin's merge (most probably using the check_whitespce HG extension) failed with " sql/src/test/mserver5-sql-readonly/Tests/mserver5-sql-readonly-table.py, line 76: trailing whitespace added sql/src/test/mserver5-sql-readonly/Tests/mserver5-sql-readonly-table.py, line 80: trailing whitespace added " but the failure was overlooked. Now re-adding the original file with trailing whitespace removed. diffs (137 lines): diff -r cc958123e39e -r 7c00b0ebe58e sql/src/test/mserver5-sql-readonly/Tests/mserver5-sql-readonly-table.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sql/src/test/mserver5-sql-readonly/Tests/mserver5-sql-readonly-table.py Thu Aug 05 13:31:46 2010 +0200 @@ -0,0 +1,133 @@ +import sys +import os +import time +from MonetDBtesting import process + +def server_readonly(): + s = process.server('sql', args = ["--readonly"], + stdin = process.PIPE, + stdout = process.PIPE, + stderr = process.PIPE) + s.stdin.write('\nio.printf("\\nReady.\\n");\n') + s.stdin.flush() + while True: + ln = s.stdout.readline() + if not ln: + print 'Unexpected EOF from server' + sys.exit(1) + sys.stdout.write(ln) + if 'Ready' in ln: + break + return s + +def server(): + s = process.server('sql', args = [], + stdin = process.PIPE, + stdout = process.PIPE, + stderr = process.PIPE) + s.stdin.write('\nio.printf("\\nReady.\\n");\n') + s.stdin.flush() + while True: + ln = s.stdout.readline() + if not ln: + print 'Unexpected EOF from server' + sys.exit(1) + sys.stdout.write(ln) + if 'Ready' in ln: + break + return s + +def server_stop(s): + out, err = s.communicate() + sys.stdout.write(out) + sys.stderr.write(err) + +def client(input): + c = process.client('sql', + stdin = process.PIPE, + stdout = process.PIPE, + stderr = process.PIPE) + out, err = c.communicate(input) + sys.stdout.write(out) + sys.stderr.write(err) + +script1 = '''\ +create table t1 (a int); +''' + +script2 = '''\ +create table t2 (a int); +''' + +script3 = '''\ +insert into t1 (a) values ( 1 ); +''' + +script4 = '''\ +select * from t1; +''' + +script5 = '''\ +drop table t2; +''' +script6 = '''\ +create table t3 (a) as select * from t1 with data; +''' + +script7 = '''\ +create table t4 (a) as select * from t1 with no data; +''' + +script8 = '''\ +drop table t1; +''' + +script9 = '''\ +create table t5 ( like t1 ); +''' + +script10 = '''\ +create temporary table t6 ( a int); +''' + +script11 = '''\ +create local temporary table t7 ( a int ); +''' + +script12 = '''\ +create global temporary table t8 ( a int ); +''' + +script13 = '''\ +update t1 set a = 2 where a = 1; +''' + +script14 = '''\ +delete from t1 where a = 1; +''' + +def main(): + s = server() + client(script1) + client(script3) + client(script4) + client(script2) + client(script5) + server_stop(s) + s = server_readonly() + client(script8) + client(script4) + client(script2) + client(script6) + client(script7) + client(script9) + client(script10) + client(script11) + client(script12) + client(script3) + client(script13) + client(script14) + server_stop(s) + +if __name__ == '__main__': + main() _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list