Changeset: d740959184d3 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/d740959184d3 Modified Files: .bumpversion.cfg MonetDB.spec clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc cmake/monetdb-versions.cmake gdk/libbat.rc monetdb5/modules/mal/tablet.c monetdb5/tools/libmonetdb5.rc sql/server/rel_select.c sql/test/Tests/All Branch: default Log Message:
Merge with Sep2022 branch. diffs (truncated from 302 to 300 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -793,3 +793,5 @@ 41ca60d96bd0198ca5d74937630a442a5fbaf1cd 41ca60d96bd0198ca5d74937630a442a5fbaf1cd Sep2022_SP1_release e8b0e5558313f4d98bc48316368299decc55ed4e Sep2022_13 e8b0e5558313f4d98bc48316368299decc55ed4e Sep2022_SP2_release +8a95168e853382b9b89ac7b67e343788ea837f3a Jul2021_31 +8a95168e853382b9b89ac7b67e343788ea837f3a Jul2021_SP9_release diff --git a/gdk/ChangeLog.Sep2022 b/gdk/ChangeLog.Sep2022 --- a/gdk/ChangeLog.Sep2022 +++ b/gdk/ChangeLog.Sep2022 @@ -1,6 +1,10 @@ # ChangeLog file for GDK # This file is updated with Maddlog +* Fri Mar 24 2023 Sjoerd Mullender <sjo...@acm.org> +- When processing the WAL, if a to-be-destroyed object cannot be found, + don't stop, but keep processing the rest of the WAL. + * Mon Feb 20 2023 Sjoerd Mullender <sjo...@acm.org> - A race condition was fixed where certain write-ahead log messages could get intermingled, resulting in a corrupted WAL file. diff --git a/monetdb5/ChangeLog.Sep2022 b/monetdb5/ChangeLog.Sep2022 --- a/monetdb5/ChangeLog.Sep2022 +++ b/monetdb5/ChangeLog.Sep2022 @@ -1,3 +1,7 @@ # ChangeLog file for MonetDB5 # This file is updated with Maddlog +* Fri Mar 24 2023 Sjoerd Mullender <sjo...@acm.org> +- Client connections are cleaned up better so that we get fewer instances + of clients that cannot connect. + diff --git a/monetdb5/modules/mal/tablet.c b/monetdb5/modules/mal/tablet.c --- a/monetdb5/modules/mal/tablet.c +++ b/monetdb5/modules/mal/tablet.c @@ -972,7 +972,7 @@ SQLload_parse_row(READERtask *task, int /* eat away the column separator */ for (; *row; row++) - if (*row == '\\') { + if (*row == '\\' && task->escape) { if (row[1]) row++; } else if (*row == ch && (task->seplen == 1 || strncmp(row, task->csep, task->seplen) == 0)) { @@ -1008,7 +1008,7 @@ SQLload_parse_row(READERtask *task, int /* eat away the column separator */ for (; *row; row++) - if (*row == '\\') { + if (*row == '\\' && task->escape) { if (row[1]) row++; } else if (*row == ch) { diff --git a/sql/ChangeLog.Sep2022 b/sql/ChangeLog.Sep2022 --- a/sql/ChangeLog.Sep2022 +++ b/sql/ChangeLog.Sep2022 @@ -1,6 +1,12 @@ # ChangeLog file for sql # This file is updated with Maddlog +* Fri Mar 24 2023 Sjoerd Mullender <sjo...@acm.org> +- Increased the size of a variable counting the number of changes made + to the database (e.g. in case more than a 2 billion rows are added to + a table). +- Improved cleanup after failures such as failed memory allocations. + * Mon Feb 13 2023 Sjoerd Mullender <sjo...@acm.org> - An insert into a table from which a column was dropped in a parallel transaction was incorrectly not flagged as a transaction conflict. diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c --- a/sql/server/rel_select.c +++ b/sql/server/rel_select.c @@ -968,6 +968,9 @@ table_ref(sql_query *query, symbol *tabl noninternexp_setname(sql->sa, e, tname, NULL); set_basecol(e); } + if (tableref->data.lval->h->next->data.sym && tableref->data.lval->h->next->data.sym->data.lval->h->next->data.lval) { /* AS with column aliases */ + temp_table = rel_table_optname(sql, temp_table, tableref->data.lval->h->next->data.sym, refs); + } list_hash_clear(exps); } } diff --git a/sql/test/BugTracker-2020/Tests/All b/sql/test/BugTracker-2020/Tests/All --- a/sql/test/BugTracker-2020/Tests/All +++ b/sql/test/BugTracker-2020/Tests/All @@ -40,7 +40,7 @@ savepoints_crash_mserver5_2.Bug-7021 transaction_with_unreleased_savepoint.Bug-7022 view_with_aggr_column.Bug-7023 delete-transaction-loose-inserts.Bug-7024 -HAVE_PYMONETDB?revokeRoleUserLoggedIN.Bug-7026 +revokeRoleUserLoggedIN.Bug-7026 drop-table-with-auto_increment.Bug-7030 -HAVE_PYMONETDB?dbfarm-foreign-chars.Bug-7031 +dbfarm-foreign-chars.Bug-7031 user-update-privs.Bug-7035 diff --git a/sql/test/BugTracker-2021/Tests/All b/sql/test/BugTracker-2021/Tests/All --- a/sql/test/BugTracker-2021/Tests/All +++ b/sql/test/BugTracker-2021/Tests/All @@ -1,5 +1,5 @@ update-from-count.Bug-7079 -HAVE_PYMONETDB?remote-table-ranges.Bug-7089 +remote-table-ranges.Bug-7089 #KNOWNFAIL?query-too-complex.Bug-7092 # this is a feature request rather than a bug KNOWNFAIL?remote-table-rollback.Bug-7094 ntile-wrong-result.Bug-7104 @@ -24,7 +24,7 @@ rollup-distinct-count.Bug-7146 sum-union.Bug-7147 distinct-union.Bug-7148 HAVE_LIBPY3?python-aggregates-empty.Bug-7158 -HAVE_PYMONETDB?remote-join-idxs.Bug-7165 +remote-join-idxs.Bug-7165 shutdown-force.Bug-7167 replace-transaction-conflict.Bug-7168 merge-table-join.Bug-7172 diff --git a/sql/test/Tests/All b/sql/test/Tests/All --- a/sql/test/Tests/All +++ b/sql/test/Tests/All @@ -127,7 +127,7 @@ HAVE_LIBZ&!NOWAL?hot_snapshot_gz HAVE_LIBBZ2&!NOWAL?hot_snapshot_bz2 HAVE_LIBLZMA&!NOWAL?hot_snapshot_xz HAVE_PYTHON_LZ4&HAVE_LIBLZ4&!NOWAL?hot_snapshot_lz4 -!HAVE_PYTHON_LZ4&HAVE_PYMONETDB&HAVE_LIBLZ4&!NOWAL?hot_snapshot_lz4_lite +!HAVE_PYTHON_LZ4&HAVE_LIBLZ4&!NOWAL?hot_snapshot_lz4_lite # The following tests are some old tests moved from sql/test ## FOREIGN KEY reference to the same table diff --git a/sql/test/miscellaneous/Tests/All b/sql/test/miscellaneous/Tests/All --- a/sql/test/miscellaneous/Tests/All +++ b/sql/test/miscellaneous/Tests/All @@ -27,3 +27,4 @@ sequences analyze_test blobs temp_tables +table_alias_on_cte diff --git a/sql/test/miscellaneous/Tests/table_alias_on_cte.test b/sql/test/miscellaneous/Tests/table_alias_on_cte.test new file mode 100644 --- /dev/null +++ b/sql/test/miscellaneous/Tests/table_alias_on_cte.test @@ -0,0 +1,8 @@ + +query I rowsort +WITH bar(i) AS (SELECT * FROM generate_series(0, 3)) +SELECT j from bar foo(j); +---- +0 +1 +2 diff --git a/testing/Mconvert.py.in b/testing/Mconvert.py.in --- a/testing/Mconvert.py.in +++ b/testing/Mconvert.py.in @@ -34,7 +34,7 @@ import struct import signal import fnmatch import glob - +import pymonetdb # check for pymonetdb early: it is essential for our work try: import winreg # Python 3 on Windows except ImportError: @@ -417,7 +417,6 @@ CONDITIONALS = { 'HAVE_LIBSCIPY3' : "", 'HAVE_PERL' : "", 'HAVE_PHP' : "", - 'HAVE_PYMONETDB' : "", # default PYTHON can import pymonetdb 'HAVE_PY3MONETDB' : "", # PYTHON3 exists and can import pymonetdb 'HAVE_PYTHON_LZ4' : "", # module lz4 is available 'HAVE_RUBY' : "", @@ -1148,10 +1147,6 @@ def RunTest(env, test, oktests, pSrvr): reason = "as %s is not available." % env['SQLCLIENT'].split(None, 1)[0] elif EXT == ".sql" and not env['exe']['SQL_Dump'][0]: reason = "as %s is not available." % env['SQLDUMP'].split(None, 1)[0] - elif EXT == ".test" and not CONDITIONALS['HAVE_PYMONETDB']: - reason = "as pymonetdb is not available." - elif EXT == ".maltest" and not CONDITIONALS['HAVE_PYMONETDB']: - reason = "as pymonetdb is not available." elif SERVER in ["MAL", "SQL"] and not env['exe']['mserver5'][0]: reason = "as %s is not available." % env['MSERVER'].split(None, 1)[0] elif EXT == ".malS" and not env['exe']['mserver5'][0]: @@ -2518,12 +2513,6 @@ def main(argv) : else: CONDITIONALS['HAVE_PY3MONETDB'] = '' # no pymonetdb for python3 try: - import pymonetdb - except ImportError: - print('Python available, but pymonetdb package not available') - else: - CONDITIONALS['HAVE_PYMONETDB'] = '#' - try: import lz4 except ImportError: CONDITIONALS['HAVE_PYTHON_LZ4'] = False diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in --- a/testing/Mtest.py.in +++ b/testing/Mtest.py.in @@ -396,7 +396,6 @@ CONDITIONALS = { 'HAVE_LIBSCIPY3' : False, 'HAVE_PERL' : False, 'HAVE_PHP' : False, - 'HAVE_PYMONETDB' : True, # default PYTHON can import pymonetdb 'HAVE_PYTHON_LZ4' : False, # module lz4 is available 'HAVE_RUBY' : False, 'HAVE_CPP' : False, @@ -1697,7 +1696,8 @@ def GetBitsAndModsAndThreads(env) : proc.killed = False proc.onechild = True t = Timer(float(par['TIMEOUT']), killProc, args = [proc, stderr, cmd]) - qOut = qErr = None + qOut = qErr = '' + mods = [] try: t.start() while True: @@ -1712,36 +1712,32 @@ def GetBitsAndModsAndThreads(env) : if proc.returncode is None: connurl = open(os.path.join(dbpath, '.conn')).read() res = mapiportre.search(connurl) - cmd = splitcommand(env['exe']['MAL_Client'][1].replace('${PORT}', res.group('port'))) - if procdebug: - print('GetBitsAndModsAndThreads: starting process "%s" (inpipe, outpipe, errpipe)\n' % '" "'.join(cmd)) - with process.Popen(cmd, stdin=process.PIPE, stdout=process.PIPE, - stderr=process.PIPE, text=True) as clnt: - input = '''\ - c := mdb.modules(); - modsid := algebra.unique(c,nil:bat); - mods := algebra.projection(modsid,c); - s := "\\nModules: "; - sep := ""; - barrier (h:oid,t:str) := iterator.new(mods); - s := s + sep; - s := s + "\'"; - s := s + t; - s := s + "\'"; - sep := ","; - redo (h:oid,t:str) := iterator.next(mods); - exit h; - s := s + "\\n"; - io.printf(s); - ''' - ##module("NoModule"); - qOut, qErr = clnt.communicate(input=input) + try: + dbh = pymonetdb.connect(username='monetdb', + password='monetdb', + hostname=HOST, + port=int(res.group('port')), + database=TSTPREF, + autocommit=True) + except KeyboardInterrupt: + raise + except: + pass + else: + crs = dbh.cursor() + crs.execute('select distinct module from sys.malfunctions() order by module') + mods = crs.fetchall() + mods = [x[0] for x in mods] + try: + mods.remove('user') + except ValueError: + pass + crs.close() + dbh.close() proc.terminate() - sOut = proc.stdout.read() - sErr = proc.stderr.read() + qOut = proc.stdout.read() + qErr = proc.stderr.read() proc.wait() - qOut = sOut + qOut - qErr = sErr + qErr finally: t.cancel() if proc.returncode is None: @@ -1749,7 +1745,7 @@ def GetBitsAndModsAndThreads(env) : proc.wait() if procdebug: print('GetBitsAndModsAndThreads: process exited "%s" (%s)\n' % ('" "'.join(cmd), proc.returncode)) - env['TST_MODS'] = [] + env['TST_MODS'] = mods env['TST_BITS'] = "" env['TST_INT128'] = "" env['TST_SINGLE'] = "" @@ -1758,7 +1754,6 @@ def GetBitsAndModsAndThreads(env) : if qOut: tbos = re.compile("^# Compiled for (?P<arch>[^-]+).*/(?P<bits>[63][42]bit)(?P<int128> with 128bit integers|)", re.MULTILINE) tt = re.compile("^# Serving database .*, using ([0-9]+) threads?", re.MULTILINE) - tm = re.compile("^Modules: (.+)$", re.MULTILINE) for l in qOut.split('\n'): obs = tbos.match(l) if obs is not None: @@ -1777,9 +1772,6 @@ def GetBitsAndModsAndThreads(env) : env['TST_SINGLE'] = "single" os.environ['TST_SINGLE'] = env['TST_SINGLE'] env['TST_THREADS'] = t.group(1) - m = tm.match(l) - if m: - env['TST_MODS'] = eval(m.group(1)) if not env['TST_BITS']: _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org