Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv3929
Modified Files:
Tag: Nov2009
sql_optimizer.mx sql_scenario.mx
Log Message:
We better protect the optimizer global structures against concurrent
access.
Index: sql_scenario.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_scenario.mx,v
retrieving revision 1.356.2.10
retrieving revision 1.356.2.11
diff -u -d -r1.356.2.10 -r1.356.2.11
--- sql_scenario.mx 30 Oct 2009 21:37:59 -0000 1.356.2.10
+++ sql_scenario.mx 31 Oct 2009 18:53:17 -0000 1.356.2.11
@@ -56,6 +56,7 @@
sql5_export str SQLtrace(int *ret);
sql5_export str SQLCacheRemove(Client c, str nme);
+sql5_export MT_Lock sql_contextLock;
#endif /* _SQL_SCENARIO_H_ */
@+ Scenario routines
@@ -88,6 +89,7 @@
static int SQLinitialized = 0;
static int SQLdebug = 0;
static char *sqlinit = NULL;
+MT_Lock sql_contextLock;
static void
monet5_freestack(int clientid, backend_stack stk)
@@ -236,6 +238,8 @@
if (SQLinitialized)
return MAL_SUCCEED;
+ MT_lock_init( &sql_contextLock, "sql_contextLock");
+
memset((char*)&be_funcs, 0, sizeof(backend_functions));
be_funcs.fstack = &monet5_freestack;
be_funcs.fcode = &monet5_freecode;
Index: sql_optimizer.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_optimizer.mx,v
retrieving revision 1.230.2.6
retrieving revision 1.230.2.7
diff -u -d -r1.230.2.6 -r1.230.2.7
--- sql_optimizer.mx 26 Oct 2009 21:44:12 -0000 1.230.2.6
+++ sql_optimizer.mx 31 Oct 2009 18:53:16 -0000 1.230.2.7
@@ -454,6 +454,7 @@
int mitosis= FALSE, deadcode= FALSE, mergetable= FALSE, replication=
FALSE;
int i;
+ mal_set_lock(sql_contextLock,"SQL optimizer");
if (optimizers[0] && strcmp(optimizers[0],"inline") ){
showException(SQL,"optimizer"," 'inline' should be the
first\n");
error++;
@@ -501,6 +502,7 @@
error++;
}
+ mal_unset_lock(sql_contextLock,"SQL optimizer");
return error;
}
------------------------------------------------------------------------------
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