MonetDB: insertonly - Do not append dupplicate oids + check the ...
Changeset: bb55f8dd0f97 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/bb55f8dd0f97 Modified Files: sql/backends/monet5/sql.c sql/scripts/77_storage.sql Branch: insertonly Log Message: Do not append dupplicate oids + check the correct flag. diffs (237 lines): diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c --- a/sql/backends/monet5/sql.c +++ b/sql/backends/monet5/sql.c @@ -4327,7 +4327,8 @@ SQLinsertonly_persist(Client cntxt, MalB (void)stk; (void)pci; - bool schema_wide = pci->argc == 3 || pci->argc == 4 ? true : false; + bool schema_wide = (pci->argc == 3 || pci->argc == 4), + bat_exists = false; bat *o0 = getArgReference_bat(stk, pci, 0), *o1 = getArgReference_bat(stk, pci, 1), @@ -4341,9 +4342,9 @@ SQLinsertonly_persist(Client cntxt, MalB mvc *m = NULL; sql_trans *tr = NULL; node *ncol; - storage *t_storage = NULL; - - BAT *bs = NULL, *tables = NULL, *oids = NULL, *rowcounts = NULL; + storage *t_del = NULL; + + BAT *b = NULL, *d = NULL, *tables = NULL, *sqlids = NULL, *rowcounts = NULL; msg = getSQLContext(cntxt, mb, &m, NULL); @@ -4364,26 +4365,24 @@ SQLinsertonly_persist(Client cntxt, MalB throw(SQL, "sql.insertonly_persist", SQLSTATE(3F000) "Schema missing %s.", i1); } else { s = m->session->schema; - /* throw(SQL, "sql.insertonly_persist", SQLSTATE(3F000) "Schema missing %s.", i1); */ - } - + } if (pci->argc != 3 && !mvc_schema_privs(m, s)) throw(SQL, "sql.insertonly_persist", SQLSTATE(42000) "Access denied for %s to schema '%s'.", get_string_global_var(m, "current_user"), s->base.name); int n = 100; - bat *commit_list = GDKmalloc(sizeof(bat) * (n + 1)); - BUN *sizes = GDKmalloc(sizeof(BUN) * (n + 1)); + bat *commit_list = GDKzalloc(sizeof(bat) * (n + 1)); + BUN *sizes = GDKzalloc(sizeof(BUN) * (n + 1)); tables = COLnew(0, TYPE_str, 0, TRANSIENT); - oids = COLnew(0, TYPE_lng, 0, TRANSIENT); + sqlids = COLnew(0, TYPE_int, 0, TRANSIENT); rowcounts = COLnew(0, TYPE_lng, 0, TRANSIENT); - if (commit_list == NULL || sizes == NULL || tables == NULL || oids == NULL || rowcounts == NULL) { + if (commit_list == NULL || sizes == NULL || tables == NULL || sqlids == NULL || rowcounts == NULL) { GDKfree(commit_list); GDKfree(sizes); - BBPnreclaim(3, tables, oids, rowcounts); + BBPnreclaim(3, tables, sqlids, rowcounts); throw(SQL, "sql.insertonly_persist", SQLSTATE(HY001)); } @@ -4406,24 +4405,32 @@ SQLinsertonly_persist(Client cntxt, MalB if (isTable(t) && t->access == TABLE_APPENDONLY) { str t_name = t->base.name; sqlid t_id = t->base.id; - t_storage = bind_del_data(tr, t, NULL); + t_del = bind_del_data(tr, t, NULL); + + if (t_del == NULL || (d = BATdescriptor(t_del->cs.bid)) == NULL) { + MT_lock_unset(&store->commit); + GDKfree(commit_list); + GDKfree(sizes); + BBPnreclaim(3, tables, sqlids, rowcounts); + throw(SQL, "sql.insertonly_persist", "Cannot access %s column storage.", t_name); + } if (ol_first_node(t->columns)) { for (ncol = ol_first_node((t)->columns); ncol; ncol = ncol->next) { sql_column *c = (sql_column *) ncol->data; - bs = store->storage_api.bind_col(tr, c, RDONLY); - - if (bs == NULL) { + b = store->storage_api.bind_col(tr, c, RDONLY); + + if (b == NULL) { MT_lock_unset(&store->commit); GDKfree(commit_list); GDKfree(sizes); - BBPnreclaim(3, tables, oids, rowcounts); + BBPnreclaim(3, tables, sqlids, rowcounts); throw(SQL, "sql.insertonly_persist", "Cannot access column descriptor."); } - if (isVIEW(bs)) -
MonetDB: insertonly - Approve signatures and emptydb tests.
Changeset: ae5fb2cba073 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/ae5fb2cba073 Modified Files: clients/Tests/MAL-signatures-hge.test clients/Tests/MAL-signatures.test sql/backends/monet5/Tests/insertonly_persist.SQL.py sql/backends/monet5/sql.c sql/backends/monet5/sql_upgrades.c sql/test/emptydb/Tests/check.stable.out sql/test/emptydb/Tests/check.stable.out.32bit sql/test/emptydb/Tests/check.stable.out.int128 Branch: insertonly Log Message: Approve signatures and emptydb tests. diffs (179 lines): diff --git a/clients/Tests/MAL-signatures-hge.test b/clients/Tests/MAL-signatures-hge.test --- a/clients/Tests/MAL-signatures-hge.test +++ b/clients/Tests/MAL-signatures-hge.test @@ -49665,14 +49665,19 @@ SQLinclude; Compile and execute a sql statements on the file sql insertonly_persist -unsafe pattern sql.insertonly_persist(X_0:str) (X_1:bat[:str], X_2:bat[:lng], X_3:bat[:lng]) +unsafe pattern sql.insertonly_persist() (X_0:bat[:str], X_1:bat[:int], X_2:bat[:lng]) SQLinsertonly_persist; -Persist deltas on append only tables in schema s. +Persist deltas on append only tables in current schema sql insertonly_persist -unsafe pattern sql.insertonly_persist(X_0:str, X_1:str) (X_2:bat[:str], X_3:bat[:lng], X_4:bat[:lng]) +unsafe pattern sql.insertonly_persist(X_0:str) (X_1:bat[:str], X_2:bat[:int], X_3:bat[:lng]) SQLinsertonly_persist; -Persist deltas on append only table in schema s table t. +Persist deltas on append only tables in schema s +sql +insertonly_persist +unsafe pattern sql.insertonly_persist(X_0:str, X_1:str) (X_2:bat[:str], X_3:bat[:int], X_4:bat[:lng]) +SQLinsertonly_persist; +Persist deltas on append only table in schema s table t sql lag pattern sql.lag(X_0:any_1, X_1:any, X_2:any_1, X_3:bit, X_4:bit):any_1 diff --git a/clients/Tests/MAL-signatures.test b/clients/Tests/MAL-signatures.test --- a/clients/Tests/MAL-signatures.test +++ b/clients/Tests/MAL-signatures.test @@ -38070,14 +38070,19 @@ SQLinclude; Compile and execute a sql statements on the file sql insertonly_persist -unsafe pattern sql.insertonly_persist(X_0:str) (X_1:bat[:str], X_2:bat[:lng], X_3:bat[:lng]) +unsafe pattern sql.insertonly_persist() (X_0:bat[:str], X_1:bat[:int], X_2:bat[:lng]) SQLinsertonly_persist; -Persist deltas on append only tables in schema s. +Persist deltas on append only tables in current schema sql insertonly_persist -unsafe pattern sql.insertonly_persist(X_0:str, X_1:str) (X_2:bat[:str], X_3:bat[:lng], X_4:bat[:lng]) +unsafe pattern sql.insertonly_persist(X_0:str) (X_1:bat[:str], X_2:bat[:int], X_3:bat[:lng]) SQLinsertonly_persist; -Persist deltas on append only table in schema s table t. +Persist deltas on append only tables in schema s +sql +insertonly_persist +unsafe pattern sql.insertonly_persist(X_0:str, X_1:str) (X_2:bat[:str], X_3:bat[:int], X_4:bat[:lng]) +SQLinsertonly_persist; +Persist deltas on append only table in schema s table t sql lag pattern sql.lag(X_0:any_1, X_1:any, X_2:any_1, X_3:bit, X_4:bit):any_1 diff --git a/sql/backends/monet5/Tests/insertonly_persist.SQL.py b/sql/backends/monet5/Tests/insertonly_persist.SQL.py --- a/sql/backends/monet5/Tests/insertonly_persist.SQL.py +++ b/sql/backends/monet5/Tests/insertonly_persist.SQL.py @@ -21,8 +21,15 @@ with tempfile.TemporaryDirectory() as fa tc.execute("ALTER TABLE foo SET INSERT ONLY").assertSucceeded() tc.execute("INSERT INTO foo SELECT * FROM generate_series(0,500)") tc.execute("SELECT count(*) FROM foo").assertSucceeded().assertDataResultMatch([(500,)]) +tc.execute("SELECT * FROM insertonly_persist()").assertSucceeded().assertDataResultMatch([('foo', 7896, 0)]) +tc.execute("CREATE TABLE bar (x INT)").assertSucceeded() +tc.execute("CREATE TABLE barbar (x INT)").assertSucceeded() +tc.execute("CREATE TABLE baz (x INT)").assertSucceeded() +tc.execute("CREATE TABLE bazbaz (x INT)").assertSucceeded() + tc.execute("SELECT sleep(2000)") -tc.execute("SELECT * FROM insertonly_persist('sys')").assertSucceeded().assertDataResultMatch([('foo', 7891, 500)]) + +tc.execute("SELECT * FROM insertonly_persist()").assertSucceeded().assertDataResultMatch([('foo', 7896, 500)]) s.communicate() with process.server(mapiport='0', dbname='db1', diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c --- a/sql/backends/monet5/sql.c +++ b/sql/backends/monet5/sql.c @@ -5249,9 +5249,9 @@ static mel_func sql_init_funcs[] = { pattern("sql", "resume_log_flushing", SQLresume_log_flushing, true, "Resume WAL log flushing", args(1,1, arg("",void))), pattern("sql", "suspend_log_flushing", SQLsuspend_log_flushing, true, "Suspend WAL log flushing", args(1,1, arg("",void))), pattern("sql", "hot_snapshot", SQLhot_snapshot, true, "Write db snapshot to the given tar(.gz/.lz4/.bz/.xz) file
MonetDB: Jun2023 - Jun2023-SP2 was released.
Changeset: fa30362b094c for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/fa30362b094c Modified Files: .hgtags Branch: Jun2023 Log Message: Jun2023-SP2 was released. diffs (8 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -812,3 +812,4 @@ 573511e0e7bf2f7ab11f00b45711aab5f1aff6f2 ce63ebe9a78c52ef0cbe8fd6f2159d2637f0387c Jun2023_7 1efa83c6409769d13b2ee30e497d5f7ab42fa955 Jun2023_9 6f88424ebfd9d82c072cf21d89070e04321983da Jun2023_11 +6f88424ebfd9d82c072cf21d89070e04321983da Jun2023_SP2_release ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: insertonly - Merge with default branch.
Changeset: 047ac6e72a0d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/047ac6e72a0d Modified Files: gdk/gdk_logger.c sql/storage/store.c Branch: insertonly Log Message: Merge with default branch. diffs (truncated from 1458 to 300 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -811,3 +811,4 @@ 573511e0e7bf2f7ab11f00b45711aab5f1aff6f2 573511e0e7bf2f7ab11f00b45711aab5f1aff6f2 Jun2023_SP1_release ce63ebe9a78c52ef0cbe8fd6f2159d2637f0387c Jun2023_7 1efa83c6409769d13b2ee30e497d5f7ab42fa955 Jun2023_9 +6f88424ebfd9d82c072cf21d89070e04321983da Jun2023_11 diff --git a/ChangeLog-Archive b/ChangeLog-Archive --- a/ChangeLog-Archive +++ b/ChangeLog-Archive @@ -1,6 +1,10 @@ # DO NOT EDIT THIS FILE -- MAINTAINED AUTOMATICALLY # This file contains past ChangeLog entries +* Fri Sep 29 2023 Sjoerd Mullender - 11.47.11-20230929 +- Fixed an installation issue on Debian and Ubuntu introduced in the + last build. + * Wed Aug 30 2023 Sjoerd Mullender - 11.47.7-20230925 - Do a lot more error checking, mostly for allocation failures. More is still needed, though. diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -860,6 +860,13 @@ fi %endif %changelog +* Fri Sep 29 2023 Sjoerd Mullender - 11.47.11-20230929 +- Rebuilt. + +* Fri Sep 29 2023 Sjoerd Mullender - 11.47.11-20230929 +- MonetDB: Fixed an installation issue on Debian and Ubuntu introduced in the + last build. + * Wed Sep 27 2023 Sjoerd Mullender - 11.47.9-20230927 - Rebuilt. - GH#7402: Privileges on merge table not propagated to partition tables diff --git a/clients/odbc/tests/ODBCtester.c b/clients/odbc/tests/ODBCtester.c --- a/clients/odbc/tests/ODBCtester.c +++ b/clients/odbc/tests/ODBCtester.c @@ -88,11 +88,7 @@ retrieveDiagMsg(SQLHANDLE stmt, char * o /* The message layout is: "[MonetDB][ODBC Driver 11.46.0][MonetDB-Test]error/warning text". The ODBC driver version numbers changes in time. Overwrite it to get a stable output */ if (strncmp(msg, "[MonetDB][ODBC Driver 11.", 25) == 0) { - for (int i = 25; msg[i] != ']'; i++) { - if (isdigit(msg[i])) { - msg[i] = '#'; - } - } + return snprintf(outp, outp_len, "SQLstate %s, Errnr %d, Message [MonetDB][ODBC Driver 11.##.#]%s\n", (char*)state, (int)errnr, strchr(msg + 25, ']') + 1); } return snprintf(outp, outp_len, "SQLstate %s, Errnr %d, Message %s\n", (char*)state, (int)errnr, (char*)msg); } diff --git a/cmake/monetdb-versions.cmake b/cmake/monetdb-versions.cmake --- a/cmake/monetdb-versions.cmake +++ b/cmake/monetdb-versions.cmake @@ -42,7 +42,7 @@ set(MONETDB_VERSION "${MONETDB_VERSION_M # common/options and common/utils) set(GDK_VERSION_MAJOR "27") set(GDK_VERSION_MINOR "0") -set(GDK_VERSION_PATCH "3") +set(GDK_VERSION_PATCH "4") set(GDK_VERSION "${GDK_VERSION_MAJOR}.${GDK_VERSION_MINOR}.${GDK_VERSION_PATCH}") # version of the MAPI library (subdirectory clients/mapilib) diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +monetdb (11.47.11) unstable; urgency=low + + * Rebuilt. + + -- Sjoerd Mullender Fri, 29 Sep 2023 12:00:43 +0200 + +monetdb (11.47.11) unstable; urgency=low + + * MonetDB: Fixed an installation issue on Debian and Ubuntu introduced in the +last build. + + -- Sjoerd Mullender Fri, 29 Sep 2023 12:00:43 +0200 + monetdb (11.47.9) unstable; urgency=low * Rebuilt. diff --git a/debian/rules b/debian/rules --- a/debian/rules +++ b/debian/rules @@ -57,3 +57,6 @@ override_dh_auto_install: rm debian/tmp/usr/lib/*/monetdb5/lib_opt_sql_append.so rm debian/tmp/usr/lib/*/monetdb5/lib_microbenchmark*.so rm debian/tmp/usr/lib/*/monetdb5/lib_udf*.so + +override_dh_installsystemd: + dh_installsystemd --no-enable --no-start diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c --- a/gdk/gdk_logger.c +++ b/gdk/gdk_logger.c @@ -1038,17 +1038,8 @@ log_create_types_file(logger *lg, const return GDK_SUCCEED; } -static inline void -rotation_lock(logger *lg) -{ - MT_lock_set(&lg->rotation_lock); -} - -static inline void -rotation_unlock(logger *lg) -{ - MT_lock_unset(&lg->rotation_lock); -} +#define rotation_lock(lg) MT_lock_set(&(lg)->rotation_lock) +#define rotation_unlock(lg)MT_lock_unset(&(lg)->rotation_lock) static gdk_return log_open_output(logger *lg) @@ -2285,7 +2276,6 @@ do_flush_range_cleanup(logger *lg) logged_range *flast = frange; lg->flush_ranges = flast; - rotation_unlock(lg); for (frange = first; frange && frange != flast; frange = frange->next) { ATOMIC_DEC(&frange->refcount); @@ -2296,6 +2286,7 @@ do_flush_range_cleanup(logger *lg) AT
MonetDB: default - Merge with Jun2023 branch.
Changeset: 1b0f1b005d6a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/1b0f1b005d6a Modified Files: .hgtags sql/server/rel_exp.c sql/server/rel_unnest.c Branch: default Log Message: Merge with Jun2023 branch. diffs (8 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -812,3 +812,4 @@ 573511e0e7bf2f7ab11f00b45711aab5f1aff6f2 ce63ebe9a78c52ef0cbe8fd6f2159d2637f0387c Jun2023_7 1efa83c6409769d13b2ee30e497d5f7ab42fa955 Jun2023_9 6f88424ebfd9d82c072cf21d89070e04321983da Jun2023_11 +6f88424ebfd9d82c072cf21d89070e04321983da Jun2023_SP2_release ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org