Changeset: 40123a5a4576 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=40123a5a4576
Modified Files:
sql/server/rel_optimizer.c
sql/server/rel_rel.c
Branch: Jul2017
Log Message:
skip indices without storage columns (just like the basetable).
diffs (44 lines):
diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c
--- a/sql/server/rel_optimizer.c
+++ b/sql/server/rel_optimizer.c
@@ -7689,12 +7689,17 @@ rel_rename_part(mvc *sql, sql_rel *p, ch
n = n->next;
if (mt->idxs.set) {
/* also possible index name mismatches */
- for( m = mt->idxs.set->h; n && m; n = n->next, m = m->next) {
+ for( m = mt->idxs.set->h; n && m; m = m->next) {
sql_exp *ne = n->data;
sql_idx *i = m->data;
- char *iname = sa_strconcat( sql->sa, "%", i->base.name);
-
+ char *iname = NULL;
+
+ if (hash_index(i->type) && list_length(i->columns) <= 1)
+ continue;
+
+ iname = sa_strconcat( sql->sa, "%", i->base.name);
exp_setname(sql->sa, ne, tname, iname);
+ n = n->next;
}
}
return p;
diff --git a/sql/server/rel_rel.c b/sql/server/rel_rel.c
--- a/sql/server/rel_rel.c
+++ b/sql/server/rel_rel.c
@@ -701,7 +701,7 @@ rel_basetable(mvc *sql, sql_table *t, co
sql_exp *e;
sql_idx *i = cn->data;
sql_subtype *t = sql_bind_localtype("lng"); /* hash
"lng" */
- char *iname = sa_strconcat( sa, "%", i->base.name);
+ char *iname = NULL;
/* do not include empty indices in the plan */
if (hash_index(i->type) && list_length(i->columns) <= 1)
@@ -710,6 +710,7 @@ rel_basetable(mvc *sql, sql_table *t, co
if (i->type == join_idx)
t = sql_bind_localtype("oid");
+ iname = sa_strconcat( sa, "%", i->base.name);
e = exp_alias(sa, atname, iname, tname, iname, t,
CARD_MULTI, 0, 1);
/* index names are prefixed, to make them independent */
if (hash_index(i->type)) {
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list