Shouldn't this go to the Apr2011 branch?

On 2011-07-16 11:59, Niels Nes wrote:
> Changeset: b86b9b374542 for MonetDB
> URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b86b9b374542
> Modified Files:
>       sql/server/rel_select.c
> Branch: Aug2011
> Log Message:
> 
> look in the 'with' scope before table scope (solves bug 2058).
> 
> 
> 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


-- 
Sjoerd Mullender

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to