Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory
sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv16942/sql/src/backends/monet5
Modified Files:
Tag: Feb2010
sql_optimizer.mx
Log Message:
At a third glance, there was a minor issue after all:
With an optimizer pipeling consisting of more than 255 optimizers
--- not that I would expect that to occur in practice ---
the code in setOptimizers() silently ignored all optimizers
beyond the 255th, as the respective error message would never
be triggered.
Just to be sure, we now indeed raise an exception and
fall back to the default pipeline (as the original code suggested)
in case we encounter a pipeline of more than 255 optimizers.
Index: sql_optimizer.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_optimizer.mx,v
retrieving revision 1.243.2.2
retrieving revision 1.243.2.3
diff -u -d -r1.243.2.2 -r1.243.2.3
--- sql_optimizer.mx 8 Apr 2010 15:14:27 -0000 1.243.2.2
+++ sql_optimizer.mx 8 Apr 2010 15:45:46 -0000 1.243.2.3
@@ -562,22 +562,24 @@
}
if ((nme = putName(optimizer,strlen(optimizer))) == 0)
showException(SQL,"optimizer"," '%s' pipeline does not
exist\n",optimizer);
- else if (top<255)
- optimizers[top++] = nme;
+ else if (top<256)
+ optimizers[top++] = nme;
+ else
+ break;
optimizer = nxt;
}
- optimizers[top] = 0;
GDKfree(base);
- if (top <= 1 && pipe == NULL){
- showException(SQL,"optimizer","Optimizer '%s' pipeline does not
exist, use default pipe instead\n", optimizerpipe?optimizerpipe:"undefined");
- setOptimizers("default_pipe");
- return GDKstrdup("default_pipe");
- }else
if (top == 256){
showException(SQL,"optimizer","Too many optimizer steps, use
default pipe instead\n");
setOptimizers("default_pipe");
return GDKstrdup("default_pipe");
}
+ optimizers[top] = 0;
+ if (top <= 1 && pipe == NULL){
+ showException(SQL,"optimizer","Optimizer '%s' pipeline does not
exist, use default pipe instead\n", optimizerpipe?optimizerpipe:"undefined");
+ setOptimizers("default_pipe");
+ return GDKstrdup("default_pipe");
+ }
return GDKstrdup(optimizerpipe);
}
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins