Update of /cvsroot/monetdb/sql/src/server
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv12056
Modified Files:
sql_parser.mx sql_rel2bin.mx sql_select.mx
Log Message:
fix handling of IS NULL for single values
solved bug in using hash indices (they were used for range queries which isn't
possible with our hashes)
U sql_rel2bin.mx
Index: sql_rel2bin.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_rel2bin.mx,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -d -r1.118 -r1.119
--- sql_rel2bin.mx 14 May 2008 20:18:26 -0000 1.118
+++ sql_rel2bin.mx 22 May 2008 12:57:41 -0000 1.119
@@ -774,7 +774,7 @@
s = n->data;
/* we can only use hash indices for lookups, not for ranges */
- if (RSEL(s))
+ if (!PSEL(s))
return l;
/* we only want selects on base columns */
if (s->op1.stval->type != st_bat)
U sql_parser.mx
Index: sql_parser.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_parser.mx,v
retrieving revision 1.282
retrieving revision 1.283
diff -u -d -r1.282 -r1.283
--- sql_parser.mx 14 May 2008 20:18:25 -0000 1.282
+++ sql_parser.mx 22 May 2008 12:57:41 -0000 1.283
@@ -3136,10 +3136,8 @@
;
test_for_null:
- column_ref IS NOT sqlNULL { symbol *s =_symbol_create_list(SQL_COLUMN,
$1);
- $$ = _symbol_create_symbol( SQL_NOT_NULL, s ); }
- | column_ref IS sqlNULL { symbol *s =_symbol_create_list(SQL_COLUMN, $1);
- $$ = _symbol_create_symbol( SQL_NULL, s ); }
+ scalar_exp IS NOT sqlNULL { $$ = _symbol_create_symbol( SQL_NOT_NULL, $1
);}
+ | scalar_exp IS sqlNULL { $$ = _symbol_create_symbol( SQL_NULL, $1 ); }
;
in_predicate:
U sql_select.mx
Index: sql_select.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_select.mx,v
retrieving revision 1.230
retrieving revision 1.231
diff -u -d -r1.230 -r1.231
--- sql_select.mx 9 May 2008 09:28:48 -0000 1.230
+++ sql_select.mx 22 May 2008 12:57:41 -0000 1.231
@@ -3511,7 +3511,7 @@
stmt *res = sql_value_exp(sql, scp, cr, grp, subset, f, iek);
/* TODO predicate! */
- if (res && f == sql_sel) {
+ if (res && (res->nrcols == 0 || f == sql_sel)) {
sql_subtype *bt = sql_bind_localtype("bit");
sql_subtype *tp = tail_type(res);
sql_subfunc *isnul =
sql_bind_func_result(sql->session->schema, "isnull", tp, NULL, bt);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins