Changeset: de36a1ecb1c2 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=de36a1ecb1c2 Modified Files: clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 clients/Tests/exports.stable.out clients/mapiclient/dump.c geom/sql/conformance/Tests/T1.stable.out geom/sql/conformance/Tests/T2.sql geom/sql/conformance/Tests/T2.stable.out geom/sql/conformance/Tests/T3.sql geom/sql/conformance/Tests/T3.stable.out geom/sql/conformance/Tests/T39.sql geom/sql/conformance/Tests/T39.stable.out geom/sql/conformance/Tests/T4.sql geom/sql/conformance/Tests/T4.stable.out geom/sql/conformance/Tests/T47.sql geom/sql/conformance/Tests/T47.stable.out geom/sql/conformance/Tests/conformance_drop.sql geom/sql/conformance/Tests/conformance_drop.stable.out geom/sql/conformance/Tests/conformance_load.sql geom/sql/conformance/Tests/conformance_load.stable.out sql/backends/monet5/sql_upgrades.c sql/scripts/51_sys_schema_extension.sql Branch: trails Log Message:
Test fixes diffs (297 lines): diff --git a/clients/Tests/MAL-signatures.stable.out b/clients/Tests/MAL-signatures.stable.out --- a/clients/Tests/MAL-signatures.stable.out +++ b/clients/Tests/MAL-signatures.stable.out @@ -629,7 +629,7 @@ stdout of test 'MAL-signatures` in direc [ "basket", "reset", "pattern basket.reset(mvc:int, sch:str, tbl:str):int ", "BSKTreset;", "Remove a basket content" ] [ "basket", "status", "pattern basket.status() (seen:bat[:timestamp], sch:bat[:str], tbl:bat[:str], window:bat[:int], stride:bat[:int], events:bat[:int], error:bat[:str]) ", "BSKTstatus;", "Show the status of the baskets" ] [ "basket", "tid", "pattern basket.tid(mvc:int, sch:str, tbl:str):bat[:oid] ", "BSKTtid;", "Collect the candidates for a basket" ] -[ "basket", "tumble", "unsafe pattern basket.tumble(mvc:any, sch:str, tbl:str):int ", "BSKTtumble;", "Eat away and slide forward" ] +[ "basket", "tumble", "unsafe pattern basket.tumble(sch:str, tbl:str):int ", "BSKTtumble;", "Eat away and slide forward" ] [ "basket", "unlock", "unsafe pattern basket.unlock(mvc:any, sch:str, tbl:str):int ", "BSKTunlock;", "Lock the basket for private use" ] [ "basket", "update", "pattern basket.update(mvc:int, sch:str, tbl:str, col:str, rid:bat[:oid], val:bat[:any]):int ", "BSKTupdate;", "Update tuples in a basket" ] [ "basket", "window", "pattern basket.window(sch:str, tbl:str, elm:int):int ", "BSKTwindow;", "Set window size" ] diff --git a/clients/Tests/MAL-signatures.stable.out.int128 b/clients/Tests/MAL-signatures.stable.out.int128 --- a/clients/Tests/MAL-signatures.stable.out.int128 +++ b/clients/Tests/MAL-signatures.stable.out.int128 @@ -733,7 +733,7 @@ stdout of test 'MAL-signatures` in direc [ "basket", "reset", "pattern basket.reset(mvc:int, sch:str, tbl:str):int ", "BSKTreset;", "Remove a basket content" ] [ "basket", "status", "pattern basket.status() (seen:bat[:timestamp], sch:bat[:str], tbl:bat[:str], window:bat[:int], stride:bat[:int], events:bat[:int], error:bat[:str]) ", "BSKTstatus;", "Show the status of the baskets" ] [ "basket", "tid", "pattern basket.tid(mvc:int, sch:str, tbl:str):bat[:oid] ", "BSKTtid;", "Collect the candidates for a basket" ] -[ "basket", "tumble", "unsafe pattern basket.tumble(mvc:any, sch:str, tbl:str):int ", "BSKTtumble;", "Eat away and slide forward" ] +[ "basket", "tumble", "unsafe pattern basket.tumble(sch:str, tbl:str):int ", "BSKTtumble;", "Eat away and slide forward" ] [ "basket", "unlock", "unsafe pattern basket.unlock(mvc:any, sch:str, tbl:str):int ", "BSKTunlock;", "Lock the basket for private use" ] [ "basket", "update", "pattern basket.update(mvc:int, sch:str, tbl:str, col:str, rid:bat[:oid], val:bat[:any]):int ", "BSKTupdate;", "Update tuples in a basket" ] [ "basket", "window", "pattern basket.window(sch:str, tbl:str, elm:int):int ", "BSKTwindow;", "Set window size" ] diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out --- a/clients/Tests/exports.stable.out +++ b/clients/Tests/exports.stable.out @@ -209,6 +209,7 @@ gdk_return BUNappend(BAT *b, const void gdk_return BUNdelete(BAT *b, oid o) __attribute__((__warn_unused_result__)); BUN BUNfnd(BAT *b, const void *right); gdk_return BUNinplace(BAT *b, BUN p, const void *right, bool force) __attribute__((__warn_unused_result__)); +gdk_return BUNremoveproperties(BAT *b) __attribute__((__warn_unused_result__)); BAT *COLcopy(BAT *b, int tt, bool writable, role_t role); BAT *COLnew(oid hseq, int tltype, BUN capacity, role_t role) __attribute__((__warn_unused_result__)); size_t GDK_mem_maxsize; @@ -2369,7 +2370,7 @@ MT_Lock mal_copyLock; void mal_dataflow_reset(void) __attribute__((__visibility__("hidden"))); MT_Lock mal_delayLock; _Noreturn void mal_exit(int status); -void mal_factory_reset(void) __attribute__((__visibility__("hidden"))); +void mal_factory_reset(Client c) __attribute__((__visibility__("hidden"))); int mal_init(void); void mal_instruction_reset(void); void mal_linker_reset(void) __attribute__((__visibility__("hidden"))); @@ -2457,7 +2458,7 @@ InstrPtr newInstruction(MalBlkPtr mb, st InstrPtr newInstructionArgs(MalBlkPtr mb, str modnme, str fcnnme, int args); MalBlkPtr newMalBlk(int elements); int newMalBlkStmt(MalBlkPtr mb, int elements); -Plant newPlant(MalBlkPtr mb); +Plant newPlant(Client cntxt, MalBlkPtr mb); InstrPtr newRaiseStmt(MalBlkPtr mb, str nme); str newRef; InstrPtr newReturnStmt(MalBlkPtr mb); diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c --- a/clients/mapiclient/dump.c +++ b/clients/mapiclient/dump.c @@ -2797,7 +2797,7 @@ dump_database(Mapi mid, stream *toConsol dquoted_print(toConsole, curschema, ";\n"); } if (type) { /* table */ - int ptype = atoi(type), dont_describe = (ptype == 3 || ptype == 5); + int ptype = atoi(type), dont_describe = (ptype == 3 || ptype == 6); rc = dump_table(mid, schema, name, toConsole, dont_describe || describe, describe, useInserts, true); } else if (query) { /* view or trigger */ diff --git a/geom/sql/conformance/Tests/T1.stable.out b/geom/sql/conformance/Tests/T1.stable.out --- a/geom/sql/conformance/Tests/T1.stable.out +++ b/geom/sql/conformance/Tests/T1.stable.out @@ -38,7 +38,7 @@ stdout of test 'T1` in directory 'geom/s [ "named_places" ] [ "ponds" ] [ "road_segments" ] -[ "streams" ] +[ "tstreams" ] # 13:36:56 > # 13:36:56 > "Done." diff --git a/geom/sql/conformance/Tests/T2.sql b/geom/sql/conformance/Tests/T2.sql --- a/geom/sql/conformance/Tests/T2.sql +++ b/geom/sql/conformance/Tests/T2.sql @@ -1,2 +1,2 @@ -- Conformance Item T2 -SELECT f_geometry_column FROM geometry_columns WHERE f_table_name = 'streams'; +SELECT f_geometry_column FROM geometry_columns WHERE f_table_name = 'tstreams'; diff --git a/geom/sql/conformance/Tests/T2.stable.out b/geom/sql/conformance/Tests/T2.stable.out --- a/geom/sql/conformance/Tests/T2.stable.out +++ b/geom/sql/conformance/Tests/T2.stable.out @@ -23,7 +23,7 @@ stdout of test 'T2` in directory 'geom/s # 13:50:01 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-12717" "--port=37941" # 13:50:01 > -#SELECT f_geometry_column FROM geometry_columns WHERE f_table_name = 'streams'; +#SELECT f_geometry_column FROM geometry_columns WHERE f_table_name = 'tstreams'; % .geometry_columns # table_name % f_geometry_column # name % varchar # type diff --git a/geom/sql/conformance/Tests/T3.sql b/geom/sql/conformance/Tests/T3.sql --- a/geom/sql/conformance/Tests/T3.sql +++ b/geom/sql/conformance/Tests/T3.sql @@ -1,2 +1,2 @@ -- Conformance Item T3 -SELECT coord_dimension FROM geometry_columns WHERE f_table_name = 'streams'; +SELECT coord_dimension FROM geometry_columns WHERE f_table_name = 'tstreams'; diff --git a/geom/sql/conformance/Tests/T3.stable.out b/geom/sql/conformance/Tests/T3.stable.out --- a/geom/sql/conformance/Tests/T3.stable.out +++ b/geom/sql/conformance/Tests/T3.stable.out @@ -25,7 +25,7 @@ stdout of test 'T3` in directory 'geom/s # 13:50:02 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-12717" "--port=37941" # 13:50:02 > -#SELECT coord_dimension FROM geometry_columns WHERE f_table_name = 'streams'; +#SELECT coord_dimension FROM geometry_columns WHERE f_table_name = 'tstreams'; % .geometry_columns # table_name % coord_dimension # name % int # type diff --git a/geom/sql/conformance/Tests/T39.sql b/geom/sql/conformance/Tests/T39.sql --- a/geom/sql/conformance/Tests/T39.sql +++ b/geom/sql/conformance/Tests/T39.sql @@ -1,2 +1,2 @@ -- Conformance Item T39 -SELECT ST_Touches(centerline, shore) FROM streams, lakes WHERE streams.name = 'Cam Stream' AND lakes.name = 'Blue Lake'; +SELECT ST_Touches(centerline, shore) FROM tstreams, lakes WHERE tstreams.name = 'Cam Stream' AND lakes.name = 'Blue Lake'; diff --git a/geom/sql/conformance/Tests/T39.stable.out b/geom/sql/conformance/Tests/T39.stable.out --- a/geom/sql/conformance/Tests/T39.stable.out +++ b/geom/sql/conformance/Tests/T39.stable.out @@ -23,7 +23,7 @@ stdout of test 'T39` in directory 'geom/ # 15:05:54 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-29161" "--port=33617" # 15:05:54 > -#SELECT ST_Touches(centerline, shore) FROM streams, lakes WHERE streams.name = 'Cam Stream' AND lakes.name = 'Blue Lake'; +#SELECT ST_Touches(centerline, shore) FROM tstreams, lakes WHERE tstreams.name = 'Cam Stream' AND lakes.name = 'Blue Lake'; % sys.%1 # table_name % %1 # name % boolean # type diff --git a/geom/sql/conformance/Tests/T4.sql b/geom/sql/conformance/Tests/T4.sql --- a/geom/sql/conformance/Tests/T4.sql +++ b/geom/sql/conformance/Tests/T4.sql @@ -1,2 +1,2 @@ -- Conformance Item T4 -SELECT srid FROM geometry_columns WHERE f_table_name = 'streams'; +SELECT srid FROM geometry_columns WHERE f_table_name = 'tstreams'; diff --git a/geom/sql/conformance/Tests/T4.stable.out b/geom/sql/conformance/Tests/T4.stable.out --- a/geom/sql/conformance/Tests/T4.stable.out +++ b/geom/sql/conformance/Tests/T4.stable.out @@ -23,7 +23,7 @@ stdout of test 'T4` in directory 'geom/s # 13:50:02 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-12717" "--port=37941" # 13:50:02 > -#SELECT srid FROM geometry_columns WHERE f_table_name = 'streams'; +#SELECT srid FROM geometry_columns WHERE f_table_name = 'tstreams'; % .geometry_columns # table_name % srid # name % int # type diff --git a/geom/sql/conformance/Tests/T47.sql b/geom/sql/conformance/Tests/T47.sql --- a/geom/sql/conformance/Tests/T47.sql +++ b/geom/sql/conformance/Tests/T47.sql @@ -1,2 +1,2 @@ -- Conformance Item T47 -SELECT ST_AsText(ST_Intersection(centerline, shore)) FROM streams, lakes WHERE streams.name = 'Cam Stream' AND lakes.name = 'Blue Lake'; +SELECT ST_AsText(ST_Intersection(centerline, shore)) FROM tstreams, lakes WHERE tstreams.name = 'Cam Stream' AND lakes.name = 'Blue Lake'; diff --git a/geom/sql/conformance/Tests/T47.stable.out b/geom/sql/conformance/Tests/T47.stable.out --- a/geom/sql/conformance/Tests/T47.stable.out +++ b/geom/sql/conformance/Tests/T47.stable.out @@ -24,7 +24,7 @@ stdout of test 'T47` in directory 'geom/ # 15:15:54 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-4470" "--port=32193" # 15:15:54 > -#SELECT ST_AsText(ST_Intersection(centerline, shore)) FROM streams, lakes WHERE streams.name = 'Cam Stream' AND lakes.name = 'Blue Lake'; +#SELECT ST_AsText(ST_Intersection(centerline, shore)) FROM tstreams, lakes WHERE tstreams.name = 'Cam Stream' AND lakes.name = 'Blue Lake'; % sys.%1 # table_name % %1 # name % clob # type diff --git a/geom/sql/conformance/Tests/conformance_drop.sql b/geom/sql/conformance/Tests/conformance_drop.sql --- a/geom/sql/conformance/Tests/conformance_drop.sql +++ b/geom/sql/conformance/Tests/conformance_drop.sql @@ -2,7 +2,7 @@ DROP TABLE map_neatlines; DROP TABLE named_places; DROP TABLE ponds; DROP TABLE buildings; -DROP TABLE streams; +DROP TABLE tstreams; DROP TABLE bridges; DROP TABLE forests; DROP TABLE divided_routes; diff --git a/geom/sql/conformance/Tests/conformance_drop.stable.out b/geom/sql/conformance/Tests/conformance_drop.stable.out --- a/geom/sql/conformance/Tests/conformance_drop.stable.out +++ b/geom/sql/conformance/Tests/conformance_drop.stable.out @@ -27,7 +27,7 @@ stdout of test 'conformance_drop` in dir #DROP TABLE named_places; #DROP TABLE ponds; #DROP TABLE buildings; -#DROP TABLE streams; +#DROP TABLE tstreams; #DROP TABLE bridges; #DROP TABLE forests; #DROP TABLE divided_routes; diff --git a/geom/sql/conformance/Tests/conformance_load.sql b/geom/sql/conformance/Tests/conformance_load.sql --- a/geom/sql/conformance/Tests/conformance_load.sql +++ b/geom/sql/conformance/Tests/conformance_load.sql @@ -29,7 +29,7 @@ CREATE TABLE bridges ( name CHARACTER VARYING(64), "position" GEOMETRY(POINT, 101)); -- Streams -CREATE TABLE streams ( +CREATE TABLE tstreams ( fid INTEGER NOT NULL PRIMARY KEY, name CHARACTER VARYING(64), centerline GEOMETRY(LINESTRING, 101)); @@ -135,11 +135,11 @@ INSERT INTO bridges VALUES( ST_PointFromText('POINT( 44 31 )', 101) ); -- Streams -INSERT INTO streams VALUES( +INSERT INTO tstreams VALUES( 111, 'Cam Stream', ST_LineFromText('LINESTRING( 38 48, 44 41, 41 36, 44 31, 52 18 )', 101) ); -INSERT INTO streams VALUES(112, NULL, +INSERT INTO tstreams VALUES(112, NULL, ST_LineFromText('LINESTRING( 76 0, 78 4, 73 9 )', 101) ); -- Buildings diff --git a/geom/sql/conformance/Tests/conformance_load.stable.out b/geom/sql/conformance/Tests/conformance_load.stable.out --- a/geom/sql/conformance/Tests/conformance_load.stable.out +++ b/geom/sql/conformance/Tests/conformance_load.stable.out @@ -78,7 +78,7 @@ stdout of test 'conformance_load` in dir # fid INTEGER NOT NULL PRIMARY KEY, # name CHARACTER VARYING(64), # "position" GEOMETRY(POINT, 101)); -#CREATE TABLE streams ( +#CREATE TABLE tstreams ( # fid INTEGER NOT NULL PRIMARY KEY, # name CHARACTER VARYING(64), # centerline GEOMETRY(LINESTRING, 101)); @@ -178,12 +178,12 @@ stdout of test 'conformance_load` in dir # ST_PointFromText('POINT( 44 31 )', 101) #); [ 1 ] -#INSERT INTO streams VALUES( +#INSERT INTO tstreams VALUES( # 111, 'Cam Stream', # ST_LineFromText('LINESTRING( 38 48, 44 41, 41 36, 44 31, 52 18 )', 101) #); [ 1 ] -#INSERT INTO streams VALUES(112, NULL, +#INSERT INTO tstreams VALUES(112, NULL, # ST_LineFromText('LINESTRING( 76 0, 78 4, 73 9 )', 101) #); [ 1 ] diff --git a/sql/backends/monet5/sql_upgrades.c b/sql/backends/monet5/sql_upgrades.c --- a/sql/backends/monet5/sql_upgrades.c +++ b/sql/backends/monet5/sql_upgrades.c @@ -2600,6 +2600,16 @@ sql_update_timetrails(Client c, mvc *sql "create table _streams (id int, table_id int, window int, stride int);\n"); } + /* 51_sys_schema_extensions */ + pos += snprintf(buf + pos, bufsize - pos, + "DROP TABLE sys.table_types;\n" + "CREATE TABLE sys.table_types (table_type_id SMALLINT NOT NULL PRIMARY KEY,table_type_name VARCHAR(25) NOT NULL);\n" + "INSERT INTO sys.table_types VALUES (0,'TABLE'),(1,'VIEW'),(3,'MERGE TABLE'),(4,'STREAM TABLE')," + "(5,'STREAM TABLE'),(6,'REMOTE TABLE'),(7,'REPLICA TABLE'),(10,'SYSTEM TABLE'),(11,'SYSTEM VIEW')," + "(20,'GLOBAL TEMPORARY TABLE'),(30,'LOCAL TEMPORARY TABLE');\n" + "ALTER TABLE sys.table_types SET READ ONLY;\n" + "GRANT SELECT ON sys.table_types TO PUBLIC;\n"); + pos += snprintf(buf + pos, bufsize - pos, "set schema \"%s\";\n", prev_schema); assert(pos < bufsize); diff --git a/sql/scripts/51_sys_schema_extension.sql b/sql/scripts/51_sys_schema_extension.sql --- a/sql/scripts/51_sys_schema_extension.sql +++ b/sql/scripts/51_sys_schema_extension.sql @@ -310,10 +310,10 @@ GRANT SELECT ON sys.keywords TO PUBLIC; CREATE TABLE sys.table_types ( table_type_id SMALLINT NOT NULL PRIMARY KEY, - table_type_name VARCHAR(25) NOT NULL UNIQUE); + table_type_name VARCHAR(25) NOT NULL); -- Values taken from sql/include/sql_catalog.h see enum table_types: --- table = 0, view = 1, merge_table = 3, stream = 4, remote = 5, replica_table = 6 +-- table = 0, view = 1, merge_table = 3, stream = 4 and 5, remote = 6, replica_table = 7 -- Note: values 10, 11, 20 and 30 are synthetically constructed, see -- view sys.tables. Do not change them as they are used by ODBC -- SQLTables(SQL_ALL_TABLE_TYPES) and JDBC methods getTableTypes() and @@ -323,8 +323,9 @@ INSERT INTO sys.table_types (table_type_ (1, 'VIEW'), (3, 'MERGE TABLE'), (4, 'STREAM TABLE'), - (5, 'REMOTE TABLE'), - (6, 'REPLICA TABLE'), + (5, 'STREAM TABLE'), + (6, 'REMOTE TABLE'), + (7, 'REPLICA TABLE'), -- synthetically constructed system obj variants (added 10 to -- sys._tables.type value when sys._tables.system is true). (10, 'SYSTEM TABLE'), _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list