Changeset: 3bdfa2844c4f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3bdfa2844c4f
Modified Files:
Branch: default
Log Message:
Merge with Aug2011 branch.
diffs (35 lines):
diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c
--- a/sql/server/rel_select.c
+++ b/sql/server/rel_select.c
@@ -1459,15 +1459,8 @@
if (sname && !(s=mvc_bind_schema(sql,sname)))
return sql_error(sql, 02, "SELECT: no such schema
'%s'", sname);
- if (!s)
- s = cur_schema(sql);
- t = mvc_bind_table(sql, s, tname);
/* TODO: search path */
if (!t && !sname) {
- s = tmp_schema(sql);
- t = mvc_bind_table(sql, s, tname);
- }
- if (!t && !sname) {
sql_subtype *tpe;
if ((tpe = stack_find_type(sql, tname)) != NULL &&
tpe->comp_type) {
@@ -1480,6 +1473,15 @@
rel_dup(temp_table);
}
if (!t && !temp_table) {
+ if (!s)
+ s = cur_schema(sql);
+ t = mvc_bind_table(sql, s, tname);
+ if (!t && !sname) {
+ s = tmp_schema(sql);
+ t = mvc_bind_table(sql, s, tname);
+ }
+ }
+ if (!t && !temp_table) {
return sql_error(sql, 02, "SELECT: no such table '%s'",
tname);
} else if (!temp_table && !table_privs(sql, t, PRIV_SELECT)) {
return sql_error(sql, 02, "SELECT: access denied for %s
to table '%s.%s'", stack_get_string(sql, "current_user"), s->base.name, tname);
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list