Changeset: b0766715d1f1 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b0766715d1f1 Added Files: sql/test/BugTracker-2008/Tests/too_many_nested_operators.SF-2102167.sql sql/test/BugTracker-2008/Tests/too_many_nested_operators.SF-2102167.stable.err sql/test/BugTracker-2008/Tests/too_many_nested_operators.SF-2102167.stable.out sql/test/BugTracker-2014/Tests/acidity-fail.Bug-3635.py sql/test/BugTracker-2014/Tests/acidity-fail.Bug-3635.stable.err sql/test/BugTracker-2014/Tests/acidity-fail.Bug-3635.stable.out Removed Files: sql/test/BugTracker-2008/Tests/too_may_nested_operators.SF-2102167.sql sql/test/BugTracker-2008/Tests/too_may_nested_operators.SF-2102167.stable.err sql/test/BugTracker-2008/Tests/too_may_nested_operators.SF-2102167.stable.out Modified Files: configure.ag sql/scripts/Makefile.ag sql/test/BugTracker-2008/Tests/All sql/test/BugTracker-2014/Tests/All testing/process.py Branch: default Log Message:
Merge with Oct2014 branch. diffs (249 lines): diff --git a/configure.ag b/configure.ag --- a/configure.ag +++ b/configure.ag @@ -1203,6 +1203,8 @@ if test "x$have_perl" != xno; then AC_MSG_ERROR([Must specify --with-perl-libdir when cross compiling]) fi PERL_LIBDIR=`"$PERL" -MConfig -e '$x=$Config{installvendorarch}; $x =~ s|$Config{vendorprefix}/||; print $x;' 2>/dev/null` + # On Darwin this starts with a slash, remove it + PERL_LIBDIR="${PERL_LIBDIR#/}" ;; no) ;; *) diff --git a/sql/scripts/Makefile.ag b/sql/scripts/Makefile.ag --- a/sql/scripts/Makefile.ag +++ b/sql/scripts/Makefile.ag @@ -20,7 +20,29 @@ MT_SAFE headers_sql = { HEADERS = sql DIR = libdir/monetdb5/createdb - SOURCES = 09_like.sql 10_math.sql 11_times.sql 12_url.sql 13_date.sql 14_inet.sql 15_querylog.sql 16_tracelog.sql 19_cluster.sql 20_vacuum.sql 21_dependency_functions.sql 22_clients.sql 23_skyserver.sql 24_zorder.sql 25_debug.sql 26_sysmon.sql 39_analytics.sql 40_json.sql 41_jsonstore.sql 45_uuid.sql 75_storagemodel.sql 80_statistics.sql 99_system.sql + SOURCES = 09_like.sql \ + 10_math.sql \ + 11_times.sql \ + 12_url.sql \ + 13_date.sql \ + 14_inet.sql \ + 15_querylog.sql \ + 16_tracelog.sql \ + 19_cluster.sql \ + 20_vacuum.sql \ + 21_dependency_functions.sql \ + 22_clients.sql \ + 23_skyserver.sql \ + 24_zorder.sql \ + 25_debug.sql \ + 26_sysmon.sql \ + 39_analytics.sql \ + 40_json.sql \ + 41_jsonstore.sql \ + 45_uuid.sql \ + 75_storagemodel.sql \ + 80_statistics.sql \ + 99_system.sql } headers_hge = { diff --git a/sql/test/BugTracker-2008/Tests/All b/sql/test/BugTracker-2008/Tests/All --- a/sql/test/BugTracker-2008/Tests/All +++ b/sql/test/BugTracker-2008/Tests/All @@ -23,7 +23,7 @@ constraint_with_schemas.SF-2080219 groupby_with_NULL.SF-2155606 invalid_qualified_column_name.SF-2183288 update_error.SF-2254506 -too_may_nested_operators.SF-2102167 +too_many_nested_operators.SF-2102167 aborting_process.SF-2130710 server_aborts_on_nested_query_without_from_in_subquery.SF-2183292 group_by_in_subquery_fails.SF-2219131 diff --git a/sql/test/BugTracker-2008/Tests/too_may_nested_operators.SF-2102167.sql b/sql/test/BugTracker-2008/Tests/too_many_nested_operators.SF-2102167.sql rename from sql/test/BugTracker-2008/Tests/too_may_nested_operators.SF-2102167.sql rename to sql/test/BugTracker-2008/Tests/too_many_nested_operators.SF-2102167.sql diff --git a/sql/test/BugTracker-2008/Tests/too_may_nested_operators.SF-2102167.stable.err b/sql/test/BugTracker-2008/Tests/too_many_nested_operators.SF-2102167.stable.err rename from sql/test/BugTracker-2008/Tests/too_may_nested_operators.SF-2102167.stable.err rename to sql/test/BugTracker-2008/Tests/too_many_nested_operators.SF-2102167.stable.err --- a/sql/test/BugTracker-2008/Tests/too_may_nested_operators.SF-2102167.stable.err +++ b/sql/test/BugTracker-2008/Tests/too_many_nested_operators.SF-2102167.stable.err @@ -1,4 +1,4 @@ -stderr of test 'too_may_nested_operators.SF-2102167` in directory 'sql/test/BugTracker-2008` itself: +stderr of test 'too_many_nested_operators.SF-2102167` in directory 'sql/test/BugTracker-2008` itself: # 20:45:18 > diff --git a/sql/test/BugTracker-2008/Tests/too_may_nested_operators.SF-2102167.stable.out b/sql/test/BugTracker-2008/Tests/too_many_nested_operators.SF-2102167.stable.out rename from sql/test/BugTracker-2008/Tests/too_may_nested_operators.SF-2102167.stable.out rename to sql/test/BugTracker-2008/Tests/too_many_nested_operators.SF-2102167.stable.out --- a/sql/test/BugTracker-2008/Tests/too_may_nested_operators.SF-2102167.stable.out +++ b/sql/test/BugTracker-2008/Tests/too_many_nested_operators.SF-2102167.stable.out @@ -1,4 +1,4 @@ -stdout of test 'too_may_nested_operators.SF-2102167` in directory 'sql/test/BugTracker-2008` itself: +stdout of test 'too_many_nested_operators.SF-2102167` in directory 'sql/test/BugTracker-2008` itself: # 20:45:18 > diff --git a/sql/test/BugTracker-2014/Tests/All b/sql/test/BugTracker-2014/Tests/All --- a/sql/test/BugTracker-2014/Tests/All +++ b/sql/test/BugTracker-2014/Tests/All @@ -64,3 +64,4 @@ stddev-empty.Bug-3628 ifthenelse.Bug-3629 order_by_incorrect_error.Bug-3630 incorrect_floating_point_cast.Bug-3633 +acidity-fail.Bug-3635 diff --git a/sql/test/BugTracker-2014/Tests/acidity-fail.Bug-3635.py b/sql/test/BugTracker-2014/Tests/acidity-fail.Bug-3635.py new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2014/Tests/acidity-fail.Bug-3635.py @@ -0,0 +1,73 @@ +try: + from MonetDBtesting import process +except ImportError: + import process + +import sys, time, monetdb.sql, os + +def connect(autocommit): + return monetdb.sql.connect(database = os.getenv('TSTDB'), + hostname = '127.0.0.1', + port = int(os.getenv('MAPIPORT')), + username = 'monetdb', + password = 'monetdb', + autocommit = autocommit) + +def query(conn, sql): + cur = conn.cursor() + cur.execute(sql) + r = cur.fetchall() + cur.close() + return r + +# no timeout since we need to kill mserver5, not the inbetween Mtimeout +s = process.server(stdin = process.PIPE, stdout = process.PIPE, stderr = process.PIPE, notimeout = True) + +# boring setup and schema creation stuff: +c1 = connect(True) +c1.execute('create table foo (a int)') +c1.execute('create table bar (a int)') +c1.execute('insert into foo values (1),(2),(3)') +# print query(c1, """select * from storage() where "table"='foo'""") +print query(c1, 'select * from foo') + +# Run 'delete from foo' with store_nr_active > 1 +# This causes MonetDB to allocate a new file for foo rather than +# wiping the existing one +c2 = connect(True) +c2.execute('start transaction') +c1.execute('delete from foo') +c2.execute('rollback') + +# Populate some new data into foo, and demonstrate that a new file has +# been allocated +c1.execute('insert into foo values (4),(5),(6)') +# print query(c1, """select * from storage() where "table"='foo'""") + +# Generate at least 1000 changes, as required by store_manager() in +# order to cause a logger restart +c1.execute('insert into bar select * from generate_series(cast(0 as int),1500)') + +# Wait at least 30 seconds in order to ensure store_manager() has done +# the logger restart +# An alternative would have been to generate at least SNAPSHOT_MINSIZE +# rows in one statement, but this way is simpler +time.sleep(31) +print query(c1, 'select * from foo') + +os.kill(s.pid, 9) + +time.sleep(10) +t = process.server(stdin = process.PIPE, stdout = process.PIPE, stderr = process.PIPE) + +c3 = connect(True) +# This prints the wrong data. It should print exactly the same as the +# previous line: "[(4,), (5,), (6,)]" , but actually prints "[(1,), +# (2,), (3,)]" +print query(c3, 'select * from foo') + +# cleanup +c3.execute('drop table foo') +c3.execute('drop table bar') + +t.communicate() diff --git a/sql/test/BugTracker-2014/Tests/acidity-fail.Bug-3635.stable.err b/sql/test/BugTracker-2014/Tests/acidity-fail.Bug-3635.stable.err new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2014/Tests/acidity-fail.Bug-3635.stable.err @@ -0,0 +1,15 @@ +stderr of test 'acidity-fail.Bug-3635` in directory 'sql/test/BugTracker-2014` itself: + + +# 15:25:29 > +# 15:25:29 > "/usr/bin/python2" "acidity-fail.Bug-3635.py" "acidity-fail.Bug-3635" +# 15:25:29 > + + +# 15:26:10 > +# 15:26:10 > "Done." +# 15:26:10 > + + + + diff --git a/sql/test/BugTracker-2014/Tests/acidity-fail.Bug-3635.stable.out b/sql/test/BugTracker-2014/Tests/acidity-fail.Bug-3635.stable.out new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2014/Tests/acidity-fail.Bug-3635.stable.out @@ -0,0 +1,15 @@ +stdout of test 'acidity-fail.Bug-3635` in directory 'sql/test/BugTracker-2014` itself: + + +# 15:25:29 > +# 15:25:29 > "/usr/bin/python2" "acidity-fail.Bug-3635.py" "acidity-fail.Bug-3635" +# 15:25:29 > + +[(1,), (2,), (3,)] +[(4,), (5,), (6,)] +[(4,), (5,), (6,)] + +# 15:26:10 > +# 15:26:10 > "Done." +# 15:26:10 > + diff --git a/testing/process.py b/testing/process.py --- a/testing/process.py +++ b/testing/process.py @@ -291,7 +291,7 @@ def client(lang, args = [], stdin = None break cmd.append('--host=%s' % host) if verbose: - sys.stdout.write('Executing' + ' '.join(cmd + args) + '\n') + sys.stdout.write('Executing: ' + ' '.join(cmd + args) + '\n') sys.stdout.flush() if log: prompt = time.strftime('# %H:%M:%S > ') @@ -333,7 +333,8 @@ def client(lang, args = [], stdin = None def server(args = [], stdin = None, stdout = None, stderr = None, mapiport = None, dbname = os.getenv('TSTDB'), dbfarm = None, - dbinit = None, bufsize = 0, log = False, notrace = False): + dbinit = None, bufsize = 0, log = False, notrace = False, + notimeout = False): '''Start a server process.''' cmd = _server[:] if not cmd: @@ -341,6 +342,8 @@ def server(args = [], stdin = None, stdo '--set', 'mapi_open=true', '--set', 'gdk_nr_threads=1', '--set', 'monet_prompt='] + if notimeout and 'Mtimeout' in cmd[0]: + del cmd[0:3] # Mtimeout -timeout 60 if notrace and '--trace' in cmd: cmd.remove('--trace') if dbinit is not None: @@ -376,7 +379,7 @@ def server(args = [], stdin = None, stdo if dbpath is not None: cmd.append('--dbpath=%s' % dbpath) if verbose: - sys.stdout.write('Executing' + ' '.join(cmd + args) + '\n') + sys.stdout.write('Executing: ' + ' '.join(cmd + args) + '\n') sys.stdout.flush() for i in range(len(args)): if args[i] == '--set' and i+1 < len(args): _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list