Update of /cvsroot/monetdb/sql/src/server
In directory sc8-pr-cvs16:/tmp/cvs-serv13457/src/server

Modified Files:
        sql_select.mx 
Log Message:
also type check the first operand of the like expression


Index: sql_select.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_select.mx,v
retrieving revision 1.187
retrieving revision 1.188
diff -u -d -r1.187 -r1.188
--- sql_select.mx       10 May 2007 08:22:29 -0000      1.187
+++ sql_select.mx       10 May 2007 08:40:24 -0000      1.188
@@ -3047,12 +3047,20 @@
                        if (stmt_set_type_param(sql, st, a) == -1) {
                                stmt_destroy(ls);
                                stmt_destroy(a);
+                               cond_stmt_destroy(e);
                                return sql_error(sql, 02, "LIKE: wrong type, 
should be string");
                        }
                } else if ((a = check_types(sql, st, a, type_equal)) == NULL) {
                        stmt_destroy(ls);
+                       cond_stmt_destroy(e);
+                       return sql_error(sql, 02, "LIKE: wrong type, should be 
string");
+               }
+               if ((ls = check_types(sql, st, ls, type_equal)) == NULL) {
+                       stmt_destroy(a);
+                       cond_stmt_destroy(e);
                        return sql_error(sql, 02, "LIKE: wrong type, should be 
string");
                }
+
                /* predicate case ? */
                if (ls->nrcols == 0 || f == sql_sel) {
                        sql_subtype *bt = sql_bind_localtype("bit");


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to