Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv1908/src/backends/monet5
Modified Files:
sql_gencode.mx
Log Message:
propagated changes of Saturday Aug 30 2008 - Tuesday Sep 02 2008
from the SQL_2-24 branch to the development trunk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2008/08/30 - nielsnes: src/backends/monet5/sql_gencode.mx,1.275.2.6
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)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Index: sql_gencode.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_gencode.mx,v
retrieving revision 1.287
retrieving revision 1.288
diff -u -d -r1.287 -r1.288
--- sql_gencode.mx 22 Aug 2008 09:53:53 -0000 1.287
+++ sql_gencode.mx 2 Sep 2008 13:20:28 -0000 1.288
@@ -688,8 +688,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 = "=";
@@ -795,6 +793,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);
@@ -846,30 +851,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");
@@ -1180,7 +1181,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