Changeset: 965b25376303 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=965b25376303
Added Files:
        sql/test/BugTracker-2019/Tests/alter_table_drop_column.Bug-6749.py
Modified Files:
        sql/test/BugTracker-2019/Tests/All
Branch: Apr2019
Log Message:

Added test for bug 6749


diffs (54 lines):

diff --git a/sql/test/BugTracker-2019/Tests/All 
b/sql/test/BugTracker-2019/Tests/All
--- a/sql/test/BugTracker-2019/Tests/All
+++ b/sql/test/BugTracker-2019/Tests/All
@@ -29,3 +29,4 @@ sum-over-hge.Bug.6738
 sequence-first-next-value.Bug-6743
 sequences-defaults.Bug-6744
 sequences-types.Bug-6745
+alter_table_drop_column.Bug-6749
diff --git a/sql/test/BugTracker-2019/Tests/alter_table_drop_column.Bug-6749.py 
b/sql/test/BugTracker-2019/Tests/alter_table_drop_column.Bug-6749.py
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2019/Tests/alter_table_drop_column.Bug-6749.py
@@ -0,0 +1,41 @@
+import sys
+
+try:
+    from MonetDBtesting import process
+except ImportError:
+    import process
+
+
+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)
+
+def server_stop(s):
+    out, err = s.communicate()
+    sys.stdout.write(out)
+    sys.stderr.write(err)
+
+s = process.server(args = [], stdin = process.PIPE, stdout = process.PIPE, 
stderr = process.PIPE)
+client('''\
+create table t (a int, b int, c int);\
+alter table t add unique (b);
+''')
+server_stop(s)
+
+s = process.server(args = [], stdin = process.PIPE, stdout = process.PIPE, 
stderr = process.PIPE)
+client('alter table t drop column c;')
+server_stop(s)
+
+s = process.server(args = [], stdin = process.PIPE, stdout = process.PIPE, 
stderr = process.PIPE)
+client('alter table t drop column b;')
+server_stop(s)
+
+s = process.server(args = [], stdin = process.PIPE, stdout = process.PIPE, 
stderr = process.PIPE)
+client('alter table t drop column b cascade;')
+server_stop(s)
+
+s = process.server(args = [], stdin = process.PIPE, stdout = process.PIPE, 
stderr = process.PIPE)
+client('drop table t;')
+server_stop(s)
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to