Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv13463/src/backends/monet5

Modified Files:
      Tag: SQL_2-24
        sql_gencode.mx 
Log Message:
added dynamic type checks in more cases (fixes 
auto_coersion_bug.SF-2075157.sql,string_length_not_checked.SF-2075078.sql)
added checks in alter table (fixes alter_view_not_allowed.SF-2075195.sql)
fixed hanling of not in (fixes select_in_wrong_result.SF-2080168.sql)
use the new thetauselect (fixes select_not_wrong_result.SF-2080151.sql)


U sql_gencode.mx
Index: sql_gencode.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_gencode.mx,v
retrieving revision 1.275.2.5
retrieving revision 1.275.2.6
diff -u -d -r1.275.2.5 -r1.275.2.6
--- sql_gencode.mx      15 Jul 2008 14:20:44 -0000      1.275.2.5
+++ sql_gencode.mx      30 Aug 2008 06:43:49 -0000      1.275.2.6
@@ -689,8 +689,6 @@
                        int l = _dumpstmt(sql, mb, s->op1.stval);
                        int r = _dumpstmt(sql, mb, s->op2.stval);
 
-                       char *cmd = s->type == st_select ? "select" : "uselect";
-
                        if (s->op2.stval->nrcols >= 1) {
                                char *mod = calcRef;
                                char *op = "=";
@@ -796,6 +794,13 @@
                                q = pushArgument(mb, q, k);
                                s->nr = getDestVar(q);
                        } else {
+                               char *cmd = s->type == st_select ? 
+                                               "select" : "uselect";
+
+                               if (s->flag != cmp_equal)
+                                       cmd = s->type == st_select ? 
+                                               "thetaselect" : "thetauselect";
+
                                switch (s->flag) {
                                case cmp_like:{
                                        int e = _dumpstmt(sql, mb, 
s->op3.stval);
@@ -847,30 +852,26 @@
                                case cmp_lt:
                                        q = newStmt1(mb, algebraRef, cmd);
                                        q = pushArgument(mb, q, l);
-                                       q = pushNil(mb, q, 
tail_type(s)->type->localtype);
                                        q = pushArgument(mb, q, r);
-                                       q = pushBit(mb, q, FALSE);
-                                       q = pushBit(mb, q, FALSE);
+                                       q = pushStr(mb, q, "<");
                                        break;
                                case cmp_lte:
                                        q = newStmt1(mb, algebraRef, cmd);
                                        q = pushArgument(mb, q, l);
-                                       q = pushNil(mb, q, 
tail_type(s)->type->localtype);
                                        q = pushArgument(mb, q, r);
+                                       q = pushStr(mb, q, "<=");
                                        break;
                                case cmp_gt:
                                        q = newStmt1(mb, algebraRef, cmd);
                                        q = pushArgument(mb, q, l);
                                        q = pushArgument(mb, q, r);
-                                       q = pushNil(mb, q, 
tail_type(s)->type->localtype);
-                                       q = pushBit(mb, q, FALSE);
-                                       q = pushBit(mb, q, FALSE);
+                                       q = pushStr(mb, q, ">");
                                        break;
                                case cmp_gte:
                                        q = newStmt1(mb, algebraRef, cmd);
                                        q = pushArgument(mb, q, l);
                                        q = pushArgument(mb, q, r);
-                                       q = pushNil(mb, q, 
tail_type(s)->type->localtype);
+                                       q = pushStr(mb, q, ">=");
                                        break;
                                default:
                                        showException(SQL,"sql","SQL2MAL: error 
impossible\n");
@@ -1176,7 +1177,8 @@
                            s->op4.typeval.type->eclass ==
                            s->op3.typeval.type->eclass &&
                            s->op3.typeval.type->eclass != EC_INTERVAL &&
-                           s->op3.typeval.type->eclass != EC_DEC 
+                           s->op3.typeval.type->eclass != EC_DEC &&
+                           s->op4.typeval.digits == 0
                           ) {
                                s->nr = l;      
                                break;


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to