Changeset: 131d8c083c7b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/131d8c083c7b
Added Files:
        sql/test/BugTracker-2022/Tests/dump-table-data.Bug-7282.test
Modified Files:
        sql/test/BugTracker-2022/Tests/All
Branch: default
Log Message:

Add test for issue 7282


diffs (87 lines):

diff --git a/sql/test/BugTracker-2022/Tests/All 
b/sql/test/BugTracker-2022/Tests/All
--- a/sql/test/BugTracker-2022/Tests/All
+++ b/sql/test/BugTracker-2022/Tests/All
@@ -7,3 +7,4 @@ empty-MAL.Bug-7259
 pkey-restart.Bug-7263
 delete-update.Bug-7267
 having-clauses.Bug-7278
+dump-table-data.Bug-7282
diff --git a/sql/test/BugTracker-2022/Tests/dump-table-data.Bug-7282.test 
b/sql/test/BugTracker-2022/Tests/dump-table-data.Bug-7282.test
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2022/Tests/dump-table-data.Bug-7282.test
@@ -0,0 +1,74 @@
+statement ok
+create table sys.t7282 ("nr" INTEGER  PRIMARY KEY, "val1" INTEGER);
+
+statement ok rowcount 3
+insert into sys.t7282 values (1, 23), (2, 45), (3, 67);
+
+query II nosort
+select * from sys.t7282;
+----
+1
+23
+2
+45
+3
+67
+
+statement ok
+create schema test;
+
+statement ok
+create table test.t7282 ("mk" VARCHAR(3) PRIMARY KEY, "val2" INTEGER);
+
+statement ok rowcount 2
+insert into test.t7282 values ('a', 23), ('b', 45);
+
+query TI nosort
+select * from test.t7282;
+----
+a
+23
+b
+45
+
+statement ok
+delete from dump_statements;
+
+statement ok
+call sys.dump_table_data();
+
+query IT nosort
+select * from dump_statements;
+----
+1|COPY 3 RECORDS INTO "sys"."t7282"("nr", "val1") FROM STDIN USING DELIMITERS 
'|',E'\n','"';
+2|1|23
+2|2|45
+2|3|67
+5|COPY 2 RECORDS INTO "test"."t7282"("mk", "val2") FROM STDIN USING DELIMITERS 
'|',E'\n','"';
+6|"a"|23
+6|"b"|45
+
+# remove one of the tables with the same name
+statement ok
+drop table sys.t7282;
+
+
+statement ok
+delete from dump_statements;
+
+statement ok
+call sys.dump_table_data();
+
+query IT nosort
+select * from dump_statements;
+----
+1|COPY 2 RECORDS INTO "test"."t7282"("mk", "val2") FROM STDIN USING DELIMITERS 
'|',E'\n','"';
+2|"a"|23
+2|"b"|45
+
+# cleanup
+statement ok
+drop table test.t7282;
+
+statement ok
+drop schema test;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to