Changeset: df0f58b61ec3 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=df0f58b61ec3
Modified Files:
sql/backends/monet5/rel_bin.c
sql/test/SQLancer/Tests/sqlancer07.stable.err.int128
Branch: unlock
Log Message:
make sure we skip the indices without storage properly
diffs (58 lines):
diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c
--- a/sql/backends/monet5/rel_bin.c
+++ b/sql/backends/monet5/rel_bin.c
@@ -3960,7 +3960,7 @@ rel2bin_insert(backend *be, sql_rel *rel
if (t->idxs.set) {
idx_m = m;
- for (n = t->idxs.set->h; n && m; n = n->next, m = m->next) {
+ for (n = t->idxs.set->h; n && m; n = n->next) {
stmt *is = m->data;
sql_idx *i = n->data;
@@ -3975,6 +3975,8 @@ rel2bin_insert(backend *be, sql_rel *rel
}
if (!insert)
insert = is;
+ /* If the index doesn't hold delta structures, don't
update the 'm' variable */
+ m = m->next;
}
}
@@ -3982,14 +3984,18 @@ rel2bin_insert(backend *be, sql_rel *rel
pos = stmt_claim(be, t, cnt);
if (t->idxs.set)
- for (n = t->idxs.set->h, m = idx_m; n && m; n = n->next, m = m->next) {
+ for (n = t->idxs.set->h, m = idx_m; n && m; n = n->next) {
stmt *is = m->data;
sql_idx *i = n->data;
- if (non_updatable_index(i->type) || (hash_index(i->type) &&
list_length(i->columns) <= 1)) /* Some indexes don't hold delta structures */
+ if (non_updatable_index(i->type)) /* Some indexes don't hold
delta structures */
continue;
+ if (hash_index(i->type) && list_length(i->columns) <= 1)
+ is = NULL;
if (is)
is = stmt_append_idx(be, i, pos, is);
+ /* If the index doesn't hold delta structures, don't update the
'm' variable */
+ m = m->next;
}
for (n = t->columns.set->h, m = inserts->op4.lval->h; n && m; n =
n->next, m = m->next) {
diff --git a/sql/test/SQLancer/Tests/sqlancer07.stable.err.int128
b/sql/test/SQLancer/Tests/sqlancer07.stable.err.int128
--- a/sql/test/SQLancer/Tests/sqlancer07.stable.err.int128
+++ b/sql/test/SQLancer/Tests/sqlancer07.stable.err.int128
@@ -48,7 +48,11 @@ MAPI = (monetdb) /var/tmp/mtest-446274/
QUERY = PREPARE SELECT DISTINCT ?, CAST(CASE least(?, r'weHtU') WHEN ? THEN ?
WHEN ? THEN ? WHEN (VALUES (?)) THEN r'G' ELSE ? END AS DATE) WHERE (?) IS NOT
NULL LIMIT 519007555986016405;
ERROR = !Cannot have a parameter (?) for IS NOT NULL operator
CODE = 42000
-MAPI = (monetdb) /var/tmp/mtest-14251/.s.monetdb.34553
+MAPI = (monetdb) /var/tmp/mtest-1182483/.s.monetdb.39468
+QUERY = CALL sys.shrink('sys', 't2');
+ERROR = !SELECT: no such binary operator 'shrink(char,char)'
+CODE = 42000
+MAPI = (monetdb) /var/tmp/mtest-1182483/.s.monetdb.39468
QUERY = PREPARE SELECT (1 + CAST(l0t0.c0 AS BIGINT)) * scale_up(?, 2) FROM
(select 1) AS l0t0(c0);
ERROR = !SELECT: no such binary operator 'sql_mul(hugeint,month_interval)'
CODE = 42000
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list