Changeset: 5af965d390de for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5af965d390de
Modified Files:
        sql/server/sql_statement.c
Branch: Apr2012
Log Message:

Don't mix op4.aval and op4.lval.
A stmt of type st_atom seems to use op4.aval (a struct atom).  If the
atom is not a string, don't fall through to the st_list case which
looks at op4.lval (a struct list) (note that op4 is a union).  Instead
just return NULL.
This fixes a crash on 32 bit platforms in the test
test/BugTracker-2010/order_by_on_single_row_view.SF-2950453.  The
crash probably doesn't happen on 64 bit platform due to a different
layout of the atom and list structures.


diffs (12 lines):

diff --git a/sql/server/sql_statement.c b/sql/server/sql_statement.c
--- a/sql/server/sql_statement.c
+++ b/sql/server/sql_statement.c
@@ -1981,6 +1981,8 @@ _table_name(sql_allocator *sa, stmt *st)
        case st_atom:
                if (st->op4.aval->data.vtype == TYPE_str && 
st->op4.aval->data.val.sval && _strlen(st->op4.aval->data.val.sval))
                        return st->op4.aval->data.val.sval;
+               return NULL;
+
        case st_list:
                if (list_length(st->op4.lval) && st->op4.lval->h)
                        return table_name(sa, st->op4.lval->h->data);
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to