Changeset: d0f8984d74e4 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/d0f8984d74e4
Modified Files:
        gdk/gdk_batop.c
        gdk/gdk_private.h
        sql/backends/monet5/rel_bin.c
        sql/backends/monet5/sql.c
        sql/backends/monet5/sql_upgrades.c
        sql/include/sql_relation.h
        sql/server/rel_optimize_proj.c
        sql/server/rel_schema.c
        sql/server/rel_updates.c
        sql/storage/bat/bat_storage.c
        sql/storage/store.c
        sql/test/emptydb/Tests/check.stable.out
        sql/test/emptydb/Tests/check.stable.out.32bit
        sql/test/emptydb/Tests/check.stable.out.int128
        sql/test/miscellaneous/Tests/simple_plans.test
        sql/test/miscellaneous/Tests/simple_selects.test
Branch: properties
Log Message:

Merged with default


diffs (truncated from 19314 to 300 lines):

diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c
--- a/clients/mapiclient/dump.c
+++ b/clients/mapiclient/dump.c
@@ -1267,6 +1267,7 @@ describe_table(Mapi mid, const char *sch
                                         type == 4 ? "STREAM " :
                                         type == 5 ? "REMOTE " :
                                         type == 6 ? "REPLICA " :
+                                        type == 7 ? "UNLOGGED " :
                                         "");
                dquoted_print(toConsole, schema, ".");
                dquoted_print(toConsole, tname, " ");
@@ -1724,6 +1725,10 @@ dump_table_data(Mapi mid, const char *sc
                        /* replica table */
                        goto doreturn;
                }
+               if (strcmp(ttype, "7") == 0) {
+                       /* unlogged table */
+                       goto doreturn;
+               }
        }
        if (mapi_error(mid))
                goto bailout;
diff --git a/clients/mapiclient/mhelp.c b/clients/mapiclient/mhelp.c
--- a/clients/mapiclient/mhelp.c
+++ b/clients/mapiclient/mhelp.c
@@ -109,15 +109,15 @@ SQLhelp sqlhelp1[] = {
         "See also 
https://www.monetdb.org/documentation/user-guide/sql-manual/transactions/"},
        {"COPY BINARY",
         "Append binary representations into a table",
-        "COPY [( BIG | LITTLE | NATIVE) ENDIAN] BINARY INTO qname 
[column_list] FROM string [',' ...] [ON { CLIENT | SERVER }] [NO CONSTRAINT]",
+        "COPY [( BIG | LITTLE | NATIVE) ENDIAN] BINARY INTO qname 
[column_list] FROM string [',' ...] [ON { CLIENT | SERVER }]",
         "qname,column_list",
         "See also 
https://www.monetdb.org/documentation/user-guide/sql-manual/data-loading/binary-loading/"},
        {"COPY INTO",
         "Parse a csv file into a table or write a query result to a csv file",
         "COPY [nrofrecords] INTO qname [column_list] FROM string [',' ...] 
[headerlist] [ON { CLIENT | SERVER }] [ separators]\n"
-        " [NULL [AS] string] [LOCKED] [BEST EFFORT] [NO CONSTRAINT] [FWF '(' 
integer [',' ...] ')'\n"
+        " [NULL [AS] string] [BEST EFFORT] [FWF '(' integer [',' ...] ')'\n"
         "COPY [nrofrecords] INTO qname [column_list] FROM STDIN [headerlist] [ 
separators]\n"
-        " [NULL [AS] string] [LOCKED] [BEST EFFORT] [NO CONSTRAINT]\n"
+        " [NULL [AS] string] [BEST EFFORT]\n"
         "COPY query_expression INTO [STDOUT | string [ON { CLIENT | SERVER }]] 
[separators] [NULL [AS] string]",
         "nrofrecords,qname,column_list,headerlist,separators",
         "See also 
https://www.monetdb.org/documentation/user-guide/sql-manual/data-loading/copy-from/"},
@@ -187,6 +187,13 @@ SQLhelp sqlhelp1[] = {
         "CREATE REMOTE TABLE [ IF NOT EXISTS ] qname ON string [WITH [USER 
'username'] [[ENCRYPTED] PASSWORD 'password']]",
         NULL,
         "remote name should match 
mapi:monetdb://host:port/database[/schema[/table]]"},
+       {"CREATE UNLOGGED TABLE",
+        "Create a new unlogged table",
+        "CREATE UNLOGGED TABLE [ IF NOT EXISTS ] qname table_source [STORAGE 
ident string]\n"
+        "CREATE UNLOGGED TABLE [ IF NOT EXISTS ] qname FROM LOADER 
function_ref\n"
+        "CREATE UNLOGGED TABLE [ IF NOT EXISTS ] qname table_source 
[on_commit]",
+        "table_source,on_commit,function_ref",
+        "See also 
https://www.monetdb.org/documentation/user-guide/sql-manual/data-definition/table-definition/"},
        {"CREATE REPLICA TABLE",
         "",
         "CREATE REPLICA TABLE [ IF NOT EXISTS ] qname table_source",
diff --git a/clients/odbc/driver/SQLGetInfo.c b/clients/odbc/driver/SQLGetInfo.c
--- a/clients/odbc/driver/SQLGetInfo.c
+++ b/clients/odbc/driver/SQLGetInfo.c
@@ -41,13 +41,15 @@ MNDBGetInfo(ODBCDbc *dbc,
        char buf[64];
        const char *sValue = NULL;      /* iff non-NULL, return string value */
        int len = sizeof(SQLUINTEGER);  /* most common size to return */
+       MapiHdl hdl = NULL;
 
        /* For some info types an active connection is needed */
        if (!dbc->Connected &&
            (InfoType == SQL_DATA_SOURCE_NAME ||
             InfoType == SQL_SERVER_NAME ||
             InfoType == SQL_DATABASE_NAME ||
-            InfoType == SQL_USER_NAME)) {
+            InfoType == SQL_USER_NAME ||
+            InfoType == SQL_KEYWORDS)) {
                /* Connection does not exist */
                addDbcError(dbc, "08003", NULL, 0);
                return SQL_ERROR;
@@ -658,39 +660,13 @@ MNDBGetInfo(ODBCDbc *dbc,
                 * SQL_CA2_SIMULATE_UNIQUE */
                break;
        case SQL_KEYWORDS:
-               /* Returns the MonetDB keywords which are not listed
-                * as ODBC keyword in the #define SQL_ODBC_KEYWORDS in
-                * sql.h, collated from
-                * sql_scan.c:scanner_init_keywords with values
-                * removed that are in
-                * sql_parser.y:non_reserved_word */
-               sValue = "ADD,ADMIN,AFTER,AGGREGATE,ALL,ALTER,ALWAYS,AND,ANY,"
-                       "ASYMMETRIC,ATOMIC,AUTO_INCREMENT,BEFORE,BEST,BIGINT,"
-                       "BIGSERIAL,BINARY,BLOB,CALL,CHAIN,CLOB,COMMITTED,COPY,"
-                       "CUME_DIST,CURRENT_ROLE,DELIMITERS,DENSE_RANK,DO,"
-                       "EACH,EFFORT,ELSEIF,ENCRYPTED,EVERY,EXCLUDE,FOLLOWING,"
-                       "FUNCTION,FWF,GENERATED,GEOMETRYCOLLECTION,"
-                       "GEOMETRYCOLLECTIONM,GEOMETRYCOLLECTIONZ,"
-                       "GEOMETRYCOLLECTIONZM,HUGEINT,IF,ILIKE,"
-                       "LATERAL,LIMIT,LINESTRING,LINESTRINGM,"
-                       "LINESTRINGZ,LINESTRINGZM,LOADER,LOCALTIME,"
-                       "LOCALTIMESTAMP,LOCKED,MEDIUMINT,MERGE,"
-                       "MULTILINESTRING,MULTILINESTRINGM,MULTILINESTRINGZ,"
-                       "MULTILINESTRINGZM,MULTIPOINT,MULTIPOINTM,MULTIPOINTZ,"
-                       "MULTIPOINTZM,MULTIPOLYGON,MULTIPOLYGONM,"
-                       "MULTIPOLYGONZ,MULTIPOLYGONZM,NEW,NOCYCLE,NOMAXVALUE,"
-                       "NOMINVALUE,NOW,OFFSET,OLD,ORDERED,OTHERS,OVER,"
-                       "PARTITION,PERCENT_RANK,POINT,POINTM,POINTZ,POINTZM,"
-                       "POLYGON,POLYGONM,POLYGONZ,POLYGONZM,PRECEDING,"
-                       "RANGE,RANK,RECORDS,REFERENCING,REMOTE,"
-                       "RENAME,REPEATABLE,REPLICA,RESTART,RETURN,RETURNS,"
-                       "ROW_NUMBER,SAMPLE,SAVEPOINT,SEQUENCE,SERIAL,"
-                       "SERIALIZABLE,SIMPLE,SPLIT_PART,STDIN,STDOUT,STREAM,"
-                       "STRING,SYMMETRIC,TIES,TINYINT,TRIGGER,TRUNCATE,"
-                       "UNBOUNDED,UNCOMMITTED,UNENCRYPTED,WHILE,WINDOW,XMLAGG,"
-                       "XMLATTRIBUTES,XMLCOMMENT,XMLCONCAT,XMLDOCUMENT,"
-                       "XMLELEMENT,XMLFOREST,XMLNAMESPACES,XMLPARSE,XMLPI,"
-                       "XMLQUERY,XMLSCHEMA,XMLTEXT,XMLVALIDATE";
+               /* Returns the MonetDB keywords, i.e. a dump of
+                * sys.keywords */
+               if ((hdl = mapi_query(dbc->mid, "WITH x(k) AS (SELECT keyword 
FROM sys.keywords ORDER BY keyword) SELECT group_concat(k, ',') FROM x")) != 
NULL && mapi_fetch_row(hdl)) {
+                       sValue = mapi_fetch_field(hdl, 0);
+               } else {
+                       addDbcError(dbc, mapi_error(dbc->mid) == MTIMEOUT ? 
"HYT01" : "HY000", NULL, 0);
+               }
                break;
        case SQL_LIKE_ESCAPE_CLAUSE:
                sValue = "Y";   /* "N" */
@@ -1194,6 +1170,9 @@ MNDBGetInfo(ODBCDbc *dbc,
                        *StringLengthPtr = len;
        }
 
+       if (hdl)
+               mapi_close_handle(hdl);
+
        return dbc->Error ? SQL_SUCCESS_WITH_INFO : SQL_SUCCESS;
 }
 
diff --git a/clients/odbc/samples/testgetinfo.c 
b/clients/odbc/samples/testgetinfo.c
--- a/clients/odbc/samples/testgetinfo.c
+++ b/clients/odbc/samples/testgetinfo.c
@@ -644,7 +644,49 @@ const struct {
                .info = SQL_KEYWORDS,
                .name = "SQL_KEYWORDS",
                .type = STRING,
-               .str = 
"ADD,ADMIN,AFTER,AGGREGATE,ALL,ALTER,ALWAYS,AND,ANY,ASYMMETRIC,ATOMIC,AUTO_INCREMENT,BEFORE,BEST,BIGINT,BIGSERIAL,BINARY,BLOB,CALL,CHAIN,CLOB,COMMITTED,COPY,CUME_DIST,CURRENT_ROLE,DELIMITERS,DENSE_RANK,DO,EACH,EFFORT,ELSEIF,ENCRYPTED,EVERY,EXCLUDE,FOLLOWING,FUNCTION,FWF,GENERATED,GEOMETRYCOLLECTION,GEOMETRYCOLLECTIONM,GEOMETRYCOLLECTIONZ,GEOMETRYCOLLECTIONZM,HUGEINT,IF,ILIKE,LATERAL,LIMIT,LINESTRING,LINESTRINGM,LINESTRINGZ,LINESTRINGZM,LOADER,LOCALTIME,LOCALTIMESTAMP,LOCKED,MEDIUMINT,MERGE,MULTILINESTRING,MULTILINESTRINGM,MULTILINESTRINGZ,MULTILINESTRINGZM,MULTIPOINT,MULTIPOINTM,MULTIPOINTZ,MULTIPOINTZM,MULTIPOLYGON,MULTIPOLYGONM,MULTIPOLYGONZ,MULTIPOLYGONZM,NEW,NOCYCLE,NOMAXVALUE,NOMINVALUE,NOW,OFFSET,OLD,ORDERED,OTHERS,OVER,PARTITION,PERCENT_RANK,POINT,POINTM,POINTZ,POINTZM,POLYGON,POLYGONM,POLYGONZ,POLYGONZM,PRECEDING,RANGE,RANK,RECORDS,REFERENCING,REMOTE,RENAME,REPEATABLE,REPLICA,RESTART,RETURN,RETURNS,ROW_NUMBER,SAMPLE,SAVEPOINT,SEQUENCE,SERIAL,SERIALIZABLE,SIMPLE,SPLI
 
T_PART,STDIN,STDOUT,STREAM,STRING,SYMMETRIC,TIES,TINYINT,TRIGGER,TRUNCATE,UNBOUNDED,UNCOMMITTED,UNENCRYPTED,WHILE,WINDOW,XMLAGG,XMLATTRIBUTES,XMLCOMMENT,XMLCONCAT,XMLDOCUMENT,XMLELEMENT,XMLFOREST,XMLNAMESPACES,XMLPARSE,XMLPI,XMLQUERY,XMLSCHEMA,XMLTEXT,XMLVALIDATE",
+               .str = "ADD,ADMIN,AFTER,AGGREGATE,ALL,ALTER,ALWAYS,ANALYZE,AND,"
+                       "ANY,ASC,ASYMMETRIC,AT,ATOMIC,AUTHORIZATION,"
+                       "AUTO_INCREMENT,BEFORE,BEGIN,BEST,BETWEEN,BIG,BIGINT,"
+                       "BIGSERIAL,BINARY,BLOB,BY,CACHE,CALL,CASCADE,CASE,CAST,"
+                       "CENTURY,CHAIN,CHAR,CHARACTER,CHECK,CLIENT,CLOB,"
+                       "COALESCE,COLUMN,COMMENT,COMMIT,COMMITTED,CONSTRAINT,"
+                       "CONTINUE,CONVERT,COPY,CORRESPONDING,CREATE,CROSS,CUBE,"
+                       "CURRENT,CURRENT_DATE,CURRENT_ROLE,CURRENT_SCHEMA,"
+                       "CURRENT_TIME,CURRENT_TIMESTAMP,CURRENT_TIMEZONE,"
+                       "CURRENT_USER,CYCLE,DATA,DATE,DAY,DEALLOCATE,DEBUG,DEC,"
+                       "DECADE,DECIMAL,DECLARE,DEFAULT,DELETE,DELIMITERS,DESC,"
+                       "DIAGNOSTICS,DISTINCT,DO,DOUBLE,DOW,DOY,DROP,EACH,"
+                       "EFFORT,ELSE,ELSEIF,ENCRYPTED,END,ENDIAN,EPOCH,ESCAPE,"
+                       "EVERY,EXCEPT,EXCLUDE,EXEC,EXECUTE,EXISTS,EXPLAIN,"
+                       "EXTERNAL,EXTRACT,FALSE,FIRST,FLOAT,FOLLOWING,FOR,"
+                       "FOREIGN,FROM,FULL,FUNCTION,FWF,GENERATED,GLOBAL,GRANT,"
+                       "GROUP,GROUPING,GROUPS,HAVING,HOUR,HUGEINT,IDENTITY,IF,"
+                       "ILIKE,IMPRINTS,IN,INCREMENT,INDEX,INNER,INSERT,INT,"
+                       "INTEGER,INTERSECT,INTERVAL,INTO,IS,ISOLATION,JOIN,KEY,"
+                       "LANGUAGE,LARGE,LAST,LATERAL,LEFT,LEVEL,LIKE,LIMIT,"
+                       "LITTLE,LOADER,LOCAL,LOCALTIME,LOCALTIMESTAMP,MATCH,"
+                       "MATCHED,MAXVALUE,MEDIUMINT,MERGE,MINUTE,MINVALUE,"
+                       "MONTH,NAME,NATIVE,NATURAL,NEW,NEXT,NO,NOT,NOW,NULL,"
+                       "NULLIF,NULLS,NUMERIC,OBJECT,OF,OFFSET,OLD,ON,ONLY,"
+                       "OPTION,OPTIONS,OR,ORDER,ORDERED,OTHERS,OUTER,OVER,"
+                       "PARTIAL,PARTITION,PASSWORD,PATH,PLAN,POSITION,"
+                       "PRECEDING,PRECISION,PREP,PREPARE,PRESERVE,PRIMARY,"
+                       "PRIVILEGES,PROCEDURE,PUBLIC,QUARTER,RANGE,READ,REAL,"
+                       "RECORDS,REFERENCES,REFERENCING,RELEASE,REMOTE,RENAME,"
+                       "REPEATABLE,REPLACE,REPLICA,RESTART,RESTRICT,RETURN,"
+                       "RETURNS,REVOKE,RIGHT,ROLE,ROLLBACK,ROLLUP,ROW,ROWS,"
+                       "SAMPLE,SAVEPOINT,SCHEMA,SECOND,SEED,SELECT,SEQUENCE,"
+                       "SERIAL,SERIALIZABLE,SERVER,SESSION,SESSION_USER,SET,"
+                       "SETS,SIMPLE,SIZE,SMALLINT,SOME,SPLIT_PART,START,"
+                       "STATEMENT,STDIN,STDOUT,STORAGE,STRING,SUBSTRING,"
+                       "SYMMETRIC,TABLE,TEMP,TEMPORARY,TEXT,THEN,TIES,TIME,"
+                       "TIMESTAMP,TINYINT,TO,TRACE,TRANSACTION,TRIGGER,TRUE,"
+                       "TRUNCATE,TYPE,UNBOUNDED,UNCOMMITTED,UNENCRYPTED,UNION,"
+                       "UNIQUE,UPDATE,USER,USING,VALUE,VALUES,VARCHAR,VARYING,"
+                       "VIEW,WEEK,WHEN,WHERE,WHILE,WINDOW,WITH,WORK,WRITE,"
+                       "XMLAGG,XMLATTRIBUTES,XMLCOMMENT,XMLCONCAT,XMLDOCUMENT,"
+                       "XMLELEMENT,XMLFOREST,XMLNAMESPACES,XMLPARSE,XMLPI,"
+                       "XMLQUERY,XMLSCHEMA,XMLTEXT,XMLVALIDATE,YEAR,ZONE",
        },
        {
                .info = SQL_LIKE_ESCAPE_CLAUSE,
@@ -1089,7 +1131,7 @@ main(int argc, char **argv)
        char *user = "monetdb";
        char *pass = "monetdb";
        SQLRETURN ret;
-       char str[2048];
+       char str[4096];
        SQLSMALLINT resultlen;
        SQLUSMALLINT s;
        SQLUINTEGER i;
diff --git a/debian/control b/debian/control
--- a/debian/control
+++ b/debian/control
@@ -17,7 +17,8 @@ X-Python-Version: >= 2.6
 
 Package: libmonetdb25
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends},
+ libmonetdb-stream25 (= ${source:Version})
 Conflicts: libmonetdb5-server-geom (<< ${source:Version})
 Description: MonetDB core library
  MonetDB is a database management system that is developed from a
@@ -34,7 +35,8 @@ Description: MonetDB core library
 Package: libmonetdb-dev
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends},
- libmonetdb25, libmonetdb-stream-dev
+ libmonetdb25 (= ${source:Version}),
+ libmonetdb-stream-dev (= ${source:Version})
 Description: MonetDB development files
  MonetDB is a database management system that is developed from a
  main-memory perspective with use of a fully decomposed storage model,
@@ -71,7 +73,8 @@ Description: MonetDB stream library deve
 
 Package: libmonetdb-client25
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends},
+ libmonetdb-stream25 (= ${source:Version})
 Description: MonetDB client/server interface library
  MonetDB is a database management system that is developed from a
  main-memory perspective with use of a fully decomposed storage model,
@@ -96,7 +99,9 @@ Description: MonetDB client/server inter
 
 Package: monetdb-client
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends},
+ libmonetdb-client25 (= ${source:Version}),
+ libmonetdb-stream25 (= ${source:Version})
 Recommends: monetdb5-sql (= ${source:Version}),
  monetdb5-server (= ${source:Version})
 Description: MonetDB database client
@@ -112,7 +117,8 @@ Description: MonetDB database client
 
 Package: libmonetdb-client-odbc
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, odbcinst
+Depends: ${shlibs:Depends}, ${misc:Depends}, odbcinst,
+ libmonetdb-client25 (= ${source:Version})
 Description: MonetDB ODBC driver
  MonetDB is a database management system that is developed from a
  main-memory perspective with use of a fully decomposed storage model,
@@ -124,6 +130,9 @@ Description: MonetDB ODBC driver
 Package: monetdb-client-testing
 Architecture: any
 Depends: ${shlibs:Depends}, libmonetdb-client-odbc (= ${source:Version}),
+ libmonetdb-client25 (= ${source:Version}),
+ libmonetdb-stream25 (= ${source:Version}),
+ libmonetdb25 (= ${source:Version}),
  monetdb5-server (= ${source:Version}),
  libdbd-monetdb-perl (>= 1.0),
  php-monetdb (>= 1.0),
@@ -143,6 +152,8 @@ Package: libmonetdb5-server-geom
 Section: libs
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends},
+ libmonetdb-stream25 (= ${source:Version}),
+ libmonetdb25 (= ${source:Version}),
  monetdb5-server (= ${source:Version})
 Description: MonetDB5 SQL GIS support module
  MonetDB is a database management system that is developed from a
@@ -157,6 +168,7 @@ Package: libmonetdb5-server-cfitsio
 Section: libs
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends},
+ libmonetdb25 (= ${source:Version}),
  monetdb5-server (= ${source:Version})
 Description: MonetDB5 add on module for FITS files
  MonetDB is a database management system that is developed from a
@@ -169,7 +181,10 @@ Description: MonetDB5 add on module for 
 
 Package: monetdb5-server
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
+Depends: ${shlibs:Depends}, ${misc:Depends}, adduser,
+ libmonetdb-client25 (= ${source:Version}),
+ libmonetdb-stream25 (= ${source:Version}),
+ libmonetdb25 (= ${source:Version}),
 Recommends: monetdb5-sql (= ${source:Version})
 Suggests: monetdb-client (= ${source:Version})
 Conflicts: monetdb5-server-hugeint (<< 11.38.0),
@@ -202,6 +217,8 @@ Description: MonetDB database server ver
 Package: monetdb5-sql
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends},
+ libmonetdb-client25 (= ${source:Version}),
+ libmonetdb-stream25 (= ${source:Version}),
  monetdb5-server (= ${source:Version})
 Conflicts: monetdb5-sql-hugeint (<< 11.38.0)
 Replaces: monetdb5-sql-hugeint (<< 11.38.0)
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to