Changeset: f8e4a7e23e4b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f8e4a7e23e4b Branch: Oct2020 Log Message:
merged diffs (167 lines): 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 @@ -1682,46 +1682,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 @@ -33,3 +33,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 > + _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list