Changeset: f5632368b1d9 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f5632368b1d9
Modified Files:
clients/mapiclient/dump.c
sql/test/testdb-reload/Tests/reload.stable.out
sql/test/testdb/Tests/dump.stable.out
sql/test/testdb/Tests/load.sql
sql/test/testdb/Tests/load.stable.out
Branch: Apr2019
Log Message:
Fixed dump and test after change to PARTITION syntax.
diffs (108 lines):
diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c
--- a/clients/mapiclient/dump.c
+++ b/clients/mapiclient/dump.c
@@ -2677,7 +2677,7 @@ dump_database(Mapi mid, stream *toConsol
mnstr_printf(toConsole, ")");
}
if (found_nil) {
- mnstr_printf(toConsole, " WITH NULL");
+ mnstr_printf(toConsole, " WITH NULL
VALUES");
}
} else { /* by range */
char *minv = NULL, *maxv = NULL, *wnulls = NULL;
@@ -2704,13 +2704,13 @@ dump_database(Mapi mid, stream *toConsol
wnulls = mapi_fetch_field(shdl, 2);
}
if (minv && maxv) {
- mnstr_printf(toConsole, " BETWEEN ");
+ mnstr_printf(toConsole, " FROM ");
squoted_print(toConsole, minv, '\'');
- mnstr_printf(toConsole, " AND ");
+ mnstr_printf(toConsole, " TO ");
squoted_print(toConsole, maxv, '\'');
}
if (strcmp(wnulls, "true") == 0) {
- mnstr_printf(toConsole, " WITH NULL");
+ mnstr_printf(toConsole, " WITH NULL
VALUES");
}
mapi_close_handle(shdl);
}
diff --git a/sql/test/testdb-reload/Tests/reload.stable.out
b/sql/test/testdb-reload/Tests/reload.stable.out
--- a/sql/test/testdb-reload/Tests/reload.stable.out
+++ b/sql/test/testdb-reload/Tests/reload.stable.out
@@ -101328,10 +101328,10 @@ 8 "attempt"
CREATE TABLE "testschema"."""" (
"""" INTEGER
);
-ALTER TABLE "testschema"."testme" ADD TABLE "testschema"."subtable1" AS
PARTITION BETWEEN '1' AND '10';
-ALTER TABLE "testschema"."testme" ADD TABLE "testschema"."subtable2" AS
PARTITION BETWEEN '11' AND '20';
+ALTER TABLE "testschema"."testme" ADD TABLE "testschema"."subtable1" AS
PARTITION FROM '1' TO '11';
+ALTER TABLE "testschema"."testme" ADD TABLE "testschema"."subtable2" AS
PARTITION FROM '11' TO '20';
ALTER TABLE "testschema"."testvaluespartitions" ADD TABLE
"testschema"."sublimits1" AS PARTITION IN ('1', '2', '3');
-ALTER TABLE "testschema"."testvaluespartitions" ADD TABLE
"testschema"."sublimits2" AS PARTITION IN ('4', '5', '6') WITH NULL;
+ALTER TABLE "testschema"."testvaluespartitions" ADD TABLE
"testschema"."sublimits2" AS PARTITION IN ('4', '5', '6') WITH NULL VALUES;
ALTER TABLE "testschema"."testvaluespartitions" ADD TABLE
"testschema"."sublimits3" AS PARTITION IN ('7', '8', '9');
ALTER TABLE "testschema"."mt3" ADD TABLE "testschema"."mt1";
ALTER TABLE "testschema"."mt3" ADD TABLE "testschema"."t4";
diff --git a/sql/test/testdb/Tests/dump.stable.out
b/sql/test/testdb/Tests/dump.stable.out
--- a/sql/test/testdb/Tests/dump.stable.out
+++ b/sql/test/testdb/Tests/dump.stable.out
@@ -101364,10 +101364,10 @@ CREATE TABLE "testschema"."geomtest" (
COPY 2 RECORDS INTO "testschema"."geomtest" FROM stdin USING DELIMITERS
E'\t',E'\n','"';
POINT (10.5 12.3) LINESTRING (10 10, 20 20, 30 40) LINESTRING (10
10, 20 20, 30 40) POLYGON ((10 10, 10 20, 20 20, 20 15, 10 10))
POLYGON ((10 10, 10 20, 20 20, 20 15, 10 10)) MULTIPOINT (20 80, 110 160, 20
160) MULTILINESTRING ((0 0, 0 80, 60 80, 60 0, 0 0)) MULTILINESTRING ((0 0,
0 80, 60 80, 60 0, 0 0)) MULTIPOLYGON (((140 110, 260 110, 170 20, 50 20, 140
110)), ((300 270, 420 270, 340 190, 220 190, 300 270))) MULTIPOLYGON (((140
110, 260 110, 170 20, 50 20, 140 110)), ((300 270, 420 270, 340 190, 220 190,
300 270))) POLYGON ((10 10, 10 20, 20 20, 20 15, 10 10))
GEOMETRYCOLLECTION (POLYGON ((0 0, 0 100, 100 100, 100 0, 0 0)), LINESTRING (10
10, 20 20, 30 40)) BOX (10.000000 10.000000, 20.000000 20.000000)
NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
NULL NULL NULL
-ALTER TABLE "testschema"."testme" ADD TABLE "testschema"."subtable1" AS
PARTITION BETWEEN '1' AND '10';
-ALTER TABLE "testschema"."testme" ADD TABLE "testschema"."subtable2" AS
PARTITION BETWEEN '11' AND '20';
+ALTER TABLE "testschema"."testme" ADD TABLE "testschema"."subtable1" AS
PARTITION FROM '1' TO '11';
+ALTER TABLE "testschema"."testme" ADD TABLE "testschema"."subtable2" AS
PARTITION FROM '11' TO '20';
ALTER TABLE "testschema"."testvaluespartitions" ADD TABLE
"testschema"."sublimits1" AS PARTITION IN ('1', '2', '3');
-ALTER TABLE "testschema"."testvaluespartitions" ADD TABLE
"testschema"."sublimits2" AS PARTITION IN ('4', '5', '6') WITH NULL;
+ALTER TABLE "testschema"."testvaluespartitions" ADD TABLE
"testschema"."sublimits2" AS PARTITION IN ('4', '5', '6') WITH NULL VALUES;
ALTER TABLE "testschema"."testvaluespartitions" ADD TABLE
"testschema"."sublimits3" AS PARTITION IN ('7', '8', '9');
ALTER TABLE "testschema"."mt3" ADD TABLE "testschema"."mt1";
ALTER TABLE "testschema"."mt3" ADD TABLE "testschema"."t4";
diff --git a/sql/test/testdb/Tests/load.sql b/sql/test/testdb/Tests/load.sql
--- a/sql/test/testdb/Tests/load.sql
+++ b/sql/test/testdb/Tests/load.sql
@@ -101252,15 +101252,15 @@ CREATE TABLE testschema.subtable1 (a int
CREATE TABLE testschema.subtable2 (a int, b varchar(32));
INSERT INTO testschema.subtable1 VALUES (1, 'one'), (2, 'two'), (3, 'three');
INSERT INTO testschema.subtable2 VALUES (11, 'eleven'), (12, 'twelve'), (13,
'thirteen');
-ALTER TABLE testschema.testme ADD TABLE testschema.subtable1 AS PARTITION
BETWEEN 1 AND 10;
-ALTER TABLE testschema.testme ADD TABLE testschema.subtable2 AS PARTITION
BETWEEN 11 AND 20;
+ALTER TABLE testschema.testme ADD TABLE testschema.subtable1 AS PARTITION FROM
1 TO 11;
+ALTER TABLE testschema.testme ADD TABLE testschema.subtable2 AS PARTITION FROM
11 TO 20;
CREATE MERGE TABLE testschema.testvaluespartitions (a int, b varchar(32))
PARTITION BY VALUES ON (a);
CREATE TABLE testschema.sublimits1 (a int, b varchar(32));
CREATE TABLE testschema.sublimits2 (a int, b varchar(32));
CREATE TABLE testschema.sublimits3 (a int, b varchar(32));
ALTER TABLE testschema.testvaluespartitions ADD TABLE testschema.sublimits1 AS
PARTITION IN ('1', '2', '3');
INSERT INTO testschema.testvaluespartitions VALUES (1, 'first');
-ALTER TABLE testschema.testvaluespartitions ADD TABLE testschema.sublimits2 AS
PARTITION IN ('4', '5', '6') WITH NULL;
+ALTER TABLE testschema.testvaluespartitions ADD TABLE testschema.sublimits2 AS
PARTITION IN ('4', '5', '6') WITH NULL VALUES;
ALTER TABLE testschema.testvaluespartitions ADD TABLE testschema.sublimits3 AS
PARTITION IN ('7', '8', '9');
INSERT INTO testschema.testvaluespartitions VALUES (1, 'a'), (5, 'b'), (7,
'c');
INSERT INTO testschema.testvaluespartitions VALUES (7, 'another'), (9, 'to'),
(9, 'pass');
diff --git a/sql/test/testdb/Tests/load.stable.out
b/sql/test/testdb/Tests/load.stable.out
--- a/sql/test/testdb/Tests/load.stable.out
+++ b/sql/test/testdb/Tests/load.stable.out
@@ -300,8 +300,8 @@ Ready.
[ 3 ]
#INSERT INTO testschema.subtable2 VALUES (11, 'eleven'), (12, 'twelve'), (13,
'thirteen');
[ 3 ]
-#ALTER TABLE testschema.testme ADD TABLE testschema.subtable1 AS PARTITION
BETWEEN 1 AND 10;
-#ALTER TABLE testschema.testme ADD TABLE testschema.subtable2 AS PARTITION
BETWEEN 11 AND 20;
+#ALTER TABLE testschema.testme ADD TABLE testschema.subtable1 AS PARTITION
FROM 1 TO 11;
+#ALTER TABLE testschema.testme ADD TABLE testschema.subtable2 AS PARTITION
FROM 11 TO 20;
#CREATE MERGE TABLE testschema.testvaluespartitions (a int, b varchar(32))
PARTITION BY VALUES ON (a);
#CREATE TABLE testschema.sublimits1 (a int, b varchar(32));
#CREATE TABLE testschema.sublimits2 (a int, b varchar(32));
@@ -309,7 +309,7 @@ Ready.
#ALTER TABLE testschema.testvaluespartitions ADD TABLE testschema.sublimits1
AS PARTITION IN ('1', '2', '3');
#INSERT INTO testschema.testvaluespartitions VALUES (1, 'first');
[ 1 ]
-#ALTER TABLE testschema.testvaluespartitions ADD TABLE testschema.sublimits2
AS PARTITION IN ('4', '5', '6') WITH NULL;
+#ALTER TABLE testschema.testvaluespartitions ADD TABLE testschema.sublimits2
AS PARTITION IN ('4', '5', '6') WITH NULL VALUES;
#ALTER TABLE testschema.testvaluespartitions ADD TABLE testschema.sublimits3
AS PARTITION IN ('7', '8', '9');
#INSERT INTO testschema.testvaluespartitions VALUES (1, 'a'), (5, 'b'), (7,
'c');
[ 3 ]
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list