Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv30583

Modified Files:
      Tag: Nov2009
        sql_optimizer.mx 
Log Message:
Make the return values private, as the enter onto the SQL stack


Index: sql_optimizer.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_optimizer.mx,v
retrieving revision 1.230.2.4
retrieving revision 1.230.2.5
diff -u -d -r1.230.2.4 -r1.230.2.5
--- sql_optimizer.mx    24 Oct 2009 08:49:48 -0000      1.230.2.4
+++ sql_optimizer.mx    24 Oct 2009 09:13:53 -0000      1.230.2.5
@@ -530,13 +530,13 @@
        if(strcmp(optimizer,"off")==0){
                if( previouspipe == NULL)
                        previouspipe = optimizerpipe;
-               else return optimizerpipe;
+               else return GDKstrdup(optimizerpipe);
                optimizer= GDKstrdup(minimalPlan);
        } else
        if (strcmp(optimizer,"on")==0){
                if (previouspipe)
                        optimizer= previouspipe;
-               else return optimizerpipe;
+               else return GDKstrdup(optimizerpipe);
                previouspipe = 0;
        } else {
                /* the optimizer may be an environment alias */
@@ -564,7 +564,7 @@
        optimizers[top] = 0;
        GDKfree(base);
        if (top == 1  && pipe == NULL){
-               showException(SQL,"optimizer","Optimizer does not exist, use 
default pipe instead\n");
+               showException(SQL,"optimizer","Optimizer '%s' does not exist, 
use default pipe instead\n", optimizerpipe?optimizerpipe:"undefined");
                setOptimizers("default_pipe");
        }else
        if (top == 256){
@@ -575,7 +575,7 @@
                showException(SQL,"optimizer"," Invalid pipeline,  use 
default_pipe instead\n");
                setOptimizers("default_pipe");
        }
-       return optimizerpipe;
+       return GDKstrdup(optimizerpipe);
 }
 
 static void


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to