Changeset: 04a7c778a7e3 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=04a7c778a7e3 Modified Files: gdk/gdk_logger.c sql/backends/monet5/sql.c sql/server/rel_exp.c sql/test/BugTracker-2020/Tests/All Branch: default Log Message:
merged with Oct2020 diffs (295 lines): diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c --- a/gdk/gdk_logger.c +++ b/gdk/gdk_logger.c @@ -3182,6 +3182,7 @@ bm_commit(logger *lg, lng save_id) return GDK_FAIL; } BBPrelease(bid); + assert(BBP_lrefs(bid)<=0 && BBP_refs(bid)==0); } if (leftover) { nfreed = logbat_new(TYPE_int, leftover, TRANSIENT); 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 @@ -563,7 +563,6 @@ mvc_bind(mvc *m, const char *sname, cons return NULL; b = store_funcs.bind_col(tr, c, access); - assert(b); return b; } diff --git a/sql/backends/monet5/sql_subquery.c b/sql/backends/monet5/sql_subquery.c --- a/sql/backends/monet5/sql_subquery.c +++ b/sql/backends/monet5/sql_subquery.c @@ -16,7 +16,7 @@ zero_or_one_error(ptr ret, const bat *bi BAT *b; BUN c; size_t _s; - const void *p; + const void *p = NULL; if ((b = BATdescriptor(*bid)) == NULL) { throw(SQL, "sql.zero_or_one", SQLSTATE(HY005) "Cannot access column descriptor"); diff --git a/sql/server/rel_exp.c b/sql/server/rel_exp.c --- a/sql/server/rel_exp.c +++ b/sql/server/rel_exp.c @@ -1695,46 +1695,20 @@ rel_find_exp_and_corresponding_rel(sql_r case op_right: case op_full: case op_join: + case op_semi: + case op_anti: ne = rel_find_exp_and_corresponding_rel(rel->l, e, res, under_join); - if (!ne) + if (!ne && is_join(rel->op)) ne = rel_find_exp_and_corresponding_rel(rel->r, e, res, under_join); if (ne && under_join) *under_join = true; break; case op_table: - if (rel->exps && e->type == e_column && e->l && exps_bind_column2(rel->exps, e->l, e->r, NULL)) - ne = e; - if (ne && res) - *res = rel; - break; - case op_union: - case op_except: - case op_inter: - { - if (rel->l) - ne = rel_find_exp_and_corresponding_rel(rel->l, e, res, under_join); - else if (rel->exps && e->l) { - ne = exps_bind_column2(rel->exps, e->l, e->r, NULL); - if (ne && res) - *res = rel; - } else if (rel->exps) { - ne = exps_bind_column(rel->exps, e->r, NULL, NULL, 1); - if (ne && res) - *res = rel; - } - } - break; case op_basetable: - if (rel->exps && e->type == e_column && e->l) - ne = exps_bind_column2(rel->exps, e->l, e->r, NULL); - if (ne && res) - *res = rel; break; default: if (!is_project(rel->op) && rel->l) ne = rel_find_exp_and_corresponding_rel(rel->l, e, res, under_join); - if (ne && (rel->op == op_semi || rel->op == op_anti) && under_join) - *under_join = true; } } return ne; 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 @@ -34,3 +34,4 @@ drop-stream-table.Bug-7005 deallocate-id.Bug-7010 values-groupby.Bug-7013 txtsim-parallel.Bug-7016 +release_old_savepoint.Bug-7020 diff --git a/sql/test/BugTracker-2020/Tests/release_old_savepoint.Bug-7020.sql b/sql/test/BugTracker-2020/Tests/release_old_savepoint.Bug-7020.sql new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2020/Tests/release_old_savepoint.Bug-7020.sql @@ -0,0 +1,18 @@ +start transaction; + +create table savepointtest (id int, primary key(id)); +savepoint name1; + +insert into savepointtest values(1), (2), (3); +select * from savepointtest; +savepoint name2; + +insert into savepointtest values(4), (5), (6); +insert into savepointtest values(7), (8), (9); +select * from savepointtest; +savepoint name3; + +release savepoint name1; +select * from savepointtest; +commit; + diff --git a/sql/test/BugTracker-2020/Tests/release_old_savepoint.Bug-7020.stable.err b/sql/test/BugTracker-2020/Tests/release_old_savepoint.Bug-7020.stable.err new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2020/Tests/release_old_savepoint.Bug-7020.stable.err @@ -0,0 +1,12 @@ +stderr of test 'release_old_savepoint.Bug-7020` in directory 'sql/test/BugTracker-2020` itself: + + +# 09:05:47 > +# 09:05:47 > "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-141551" "--port=39186" +# 09:05:47 > + + +# 09:05:47 > +# 09:05:47 > "Done." +# 09:05:47 > + diff --git a/sql/test/BugTracker-2020/Tests/release_old_savepoint.Bug-7020.stable.out b/sql/test/BugTracker-2020/Tests/release_old_savepoint.Bug-7020.stable.out new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2020/Tests/release_old_savepoint.Bug-7020.stable.out @@ -0,0 +1,61 @@ +stdout of test 'release_old_savepoint.Bug-7020` in directory 'sql/test/BugTracker-2020` itself: + + +# 09:05:47 > +# 09:05:47 > "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-141551" "--port=39186" +# 09:05:47 > + +#start transaction; +#create table savepointtest (id int, primary key(id)); +#savepoint name1; +#insert into savepointtest values(1), (2), (3); +[ 3 ] +#select * from savepointtest; +% sys.savepointtest # table_name +% id # name +% int # type +% 1 # length +[ 1 ] +[ 2 ] +[ 3 ] +#savepoint name2; +#insert into savepointtest values(4), (5), (6); +[ 3 ] +#insert into savepointtest values(7), (8), (9); +[ 3 ] +#select * from savepointtest; +% sys.savepointtest # table_name +% id # name +% int # type +% 1 # length +[ 1 ] +[ 2 ] +[ 3 ] +[ 4 ] +[ 5 ] +[ 6 ] +[ 7 ] +[ 8 ] +[ 9 ] +#savepoint name3; +#release savepoint name1; +#select * from savepointtest; +% sys.savepointtest # table_name +% id # name +% int # type +% 1 # length +[ 1 ] +[ 2 ] +[ 3 ] +[ 4 ] +[ 5 ] +[ 6 ] +[ 7 ] +[ 8 ] +[ 9 ] +#commit; + +# 09:05:47 > +# 09:05:47 > "Done." +# 09:05:47 > + diff --git a/sql/test/Skyserver/run.all b/sql/test/Skyserver/run.all --- a/sql/test/Skyserver/run.all +++ b/sql/test/Skyserver/run.all @@ -32,9 +32,19 @@ EOF echo tables $SQL < Skyserver_tables.sql +cat << EOF > .monetdb +user=monetdb +password=monetdb +EOF + echo loading cat Skyserver_import.sql | sed -e "s|DATA|$PWD/microsky|g" | $SQL +cat << EOF > .monetdb +user=skyserver +password=skyserver +EOF + echo Constraints $SQL < Skyserver_constraints.sql @@ -46,8 +56,6 @@ echo functions echo Cleanup $SQL < Skyserver_dropFunctions.sql -$SQL < Skyserver_dropMs_functions.sql -$SQL < Skyserver_dropMath.sql $SQL < Skyserver_dropViews.sql $SQL < Skyserver_dropConstraints.sql $SQL < Skyserver_dropTables.sql diff --git a/sql/test/Skyserver/runv6.all b/sql/test/Skyserver/runv6.all --- a/sql/test/Skyserver/runv6.all +++ b/sql/test/Skyserver/runv6.all @@ -17,11 +17,36 @@ fi #Bulk-Load into SQL server... +cat << EOF > .monetdb +user=monetdb +password=monetdb +EOF + echo Create User $SQL < create_user.sql +cat << EOF > .monetdb +user=skyserver +password=skyserver +EOF + echo tables $SQL1 < Skyserver_tables_v6.sql + +cat << EOF > .monetdb +user=monetdb +password=monetdb +EOF + +echo loading +cat Skyserver_import_v6.sql | sed -e "s|DATA_DIR|$PWD/microsky_v6|g" | $SQL + +cat << EOF > .monetdb +user=skyserver +password=skyserver +EOF + +echo Constraints $SQL1 < Skyserver_constraints_v6.sql echo views @@ -30,14 +55,18 @@ echo views echo functions $SQL1 < Skyserver_functions_v6.sql -exit echo Cleanup $SQL1 < Skyserver_dropFunctions_v6.sql -$SQL1 < Skyserver_dropMs_functions.sql -$SQL1 < Skyserver_dropMath.sql $SQL1 < Skyserver_dropViews_v6.sql $SQL1 < Skyserver_dropConstraints_v6.sql $SQL1 < Skyserver_dropTables_v6.sql +cat << EOF > .monetdb +user=monetdb +password=monetdb +EOF + echo Remove User $SQL < drop_user.sql + +rm -f .monetdb _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list