Changeset: 9a7d230d33a4 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9a7d230d33a4
Modified Files:
monetdb5/mal/mal_authorize.c
sql/server/rel_optimizer.c
Branch: Jul2012
Log Message:
Merged from Apr2012
diffs (52 lines):
diff --git a/monetdb5/mal/mal_authorize.c b/monetdb5/mal/mal_authorize.c
--- a/monetdb5/mal/mal_authorize.c
+++ b/monetdb5/mal/mal_authorize.c
@@ -266,7 +266,7 @@ AUTHaddUser(oid *uid, Client *c, str *us
BUN p;
oid *id;
str tmp;
- str hash;
+ str hash = NULL;
BATiter useri;
rethrow("addUser", tmp, AUTHrequireAdmin(c));
@@ -452,7 +452,7 @@ str
AUTHsetPassword(Client *c, str *username, str *passwd) {
BUN p;
str tmp;
- str hash;
+ str hash = NULL;
oid id;
BATiter useri;
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
@@ -4686,11 +4686,14 @@ rel_use_index(int *changes, mvc *sql, sq
if (is_select(rel->op) || is_join(rel->op)) {
list *exps = NULL;
sql_idx *i = find_index(sql->sa, rel, rel, &exps);
+ int left = 1;
if (!i && is_join(rel->op))
i = find_index(sql->sa, rel, rel->l, &exps);
- if (!i && is_join(rel->op))
+ if (!i && is_join(rel->op)) {
+ left = 0;
i = find_index(sql->sa, rel, rel->r, &exps);
+ }
if (i) {
prop *p;
@@ -4700,6 +4703,11 @@ rel_use_index(int *changes, mvc *sql, sq
for( n = exps->h; n; n = n->next) {
sql_exp *e = n->data;
+ /* swapped ? */
+ if (is_join(rel->op) &&
+ ((left && !rel_find_exp(rel->l, e->l))
||
+ (!left && !rel_find_exp(rel->r,
e->l))))
+ n->data = e = exp_compare(sql->sa,
e->r, e->l, cmp_equal);
p = find_prop(e->p, PROP_HASHCOL);
if (!p)
e->p = p = prop_create(sql->sa,
PROP_HASHCOL, e->p);
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list