Update of /cvsroot/monetdb/sql/src/server
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv11143/src/server

Modified Files:
        sql_mvc.mx sql_scan.mx sql_schema.mx sql_select.mx 
Log Message:
propagated changes of Tuesday Mar 13 2007 - Friday Mar 16 2007
from the SQL_2-16 branch to the development trunk


Index: sql_mvc.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_mvc.mx,v
retrieving revision 1.173
retrieving revision 1.174
diff -u -d -r1.173 -r1.174
--- sql_mvc.mx  2 Feb 2007 19:49:56 -0000       1.173
+++ sql_mvc.mx  16 Mar 2007 12:36:25 -0000      1.174
@@ -37,6 +37,8 @@
 #include <sql_keyword.h>
 #include <sql_atom.h>
 
+#define SQL_MAXDEPTH ((THREAD_STACK_SIZE/4096)/4)
+
 #define ERRSIZE 8192
 
 typedef enum modes_t {

Index: sql_scan.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_scan.mx,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -d -r1.123 -r1.124
--- sql_scan.mx 7 Mar 2007 15:02:43 -0000       1.123
+++ sql_scan.mx 16 Mar 2007 12:36:25 -0000      1.124
@@ -711,14 +711,16 @@
 {
        struct scanner *lc = &c->scanner;
        int next = 0;
+       int started = lc->started;
 
        if (cur == '/') {
+               lc->started = 1;
                next = scanner_getc(lc);
                if (next == '*') {
+                       lc->started = started;
                        cur = skip_c_comment(lc);
                        return tokenize(c, cur);
                } else {
-                       lc->started = 1;
                        utf8_putchar(lc, next); 
                        return scanner_token(lc, cur);
                }
@@ -733,8 +735,10 @@
        }
        switch (cur) {
        case '-':
+               lc->started = 1;
                next = scanner_getc(lc);
                if (next == '-') {
+                       lc->started = started;
                        if ((cur = skip_sql_comment(lc)) == EOF)
                                return cur;
                        return tokenize(c, cur);
@@ -892,7 +896,7 @@
 
        if (token == IDENT || token == COMPARISON || token == AGGR || token == 
RANK || token == aTYPE || token == ALIAS)
                yylval->sval = sa_strndup(c->sa, yylval->sval, 
lc->yycur-lc->yysval);
-       if (token == STRING) {
+       else if (token == STRING) {
                char quote = *yylval->sval;
                char *str = sa_alloc( c->sa, (lc->yycur-lc->yysval-2)*2 +1 );
                assert(quote == '"' || quote == '\'');

Index: sql_select.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_select.mx,v
retrieving revision 1.177
retrieving revision 1.178
diff -u -d -r1.177 -r1.178
--- sql_select.mx       20 Feb 2007 11:50:47 -0000      1.177
+++ sql_select.mx       16 Mar 2007 12:36:27 -0000      1.178
@@ -982,9 +982,6 @@
        return ls;
 }
 
-
-#define SQL_MAXDEPTH ((THREAD_STACK_SIZE/4096)/4)
-
 static stmt *
 sql_binop(mvc *sql, scope *scp, symbol *se, group *grp, stmt *subset, int f)
 {

Index: sql_schema.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_schema.mx,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -d -r1.114 -r1.115
--- sql_schema.mx       2 Feb 2007 19:49:56 -0000       1.114
+++ sql_schema.mx       16 Mar 2007 12:36:26 -0000      1.115
@@ -750,11 +750,14 @@
                                return sql_error(sql, 01, "CREATE VIEW: ORDER 
BY not supported");
                }
 
+               sql->depth++;
+               if (sql->depth > SQL_MAXDEPTH)
+                       return sql_error(sql, 02, "CREATE VIEW: too many nested 
VIEWS");
                sq = scope_subquery(sql, NULL, query, ek );
+               sql->depth--;
                if (!sq)
                        return NULL;
 
-
                if (!instantiate) {
                        t = mvc_create_view(sql, s, name, q, 0);
                        as_subquery( sql, t, sq, column_spec );


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to