On Tue, Jul 22, 2008 at 03:48:02PM +0000, Sjoerd Mullender wrote:
> Update of /cvsroot/monetdb/MonetDB5/src/mal
> In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv5497
>
> Modified Files:
> mal_recycle.mx
> Log Message:
> Fix so that initialization happens *exactly* once.
> The initialization of a per-process (a.k.a. global) varirable should
> be governed by a per-process variable, not a per-thread or
> per-something-else variable. Especially not if that variable isn't
> actually used to indicate whether initialization took place (see
> OPTrecycleImplementation in src/optimizer/opt_recycler.mx where
> version was set to -1 which broke the use here.
>
This fixes most of the numerous SQL tests that were failing on Windows (with
M5 server, only) --- thank you very much for caring and taking care!
Stefan
>
> U mal_recycle.mx
> Index: mal_recycle.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/MonetDB5/src/mal/mal_recycle.mx,v
> retrieving revision 1.120
> retrieving revision 1.121
> diff -u -d -r1.120 -r1.121
> --- mal_recycle.mx 22 Jul 2008 06:27:53 -0000 1.120
> +++ mal_recycle.mx 22 Jul 2008 15:47:58 -0000 1.121
> @@ -244,10 +244,13 @@
>
> void RECYCLEversion(Client cntxt, MalBlkPtr mb)
> {
> + static int recycleLockInitialized = 0;
> int i;
>
> - if (mb->version == 0)
> + if (!recycleLockInitialized) {
> MT_init_lock(recycleLock,"recycleLock");
> + recycleLockInitialized = 1;
> + }
> if ( mb->version && mb->version != recycleVersion) {
> mal_set_lock(recycleLock,"recycle");
> /* all re-used instructions are dropped */
> @@ -257,8 +260,8 @@
> (void) cntxt;
> #endif
> for(i=1; i<mb->stop; i++)
> - if (getInstrPtr(mb,i)->recycle)
> - getInstrPtr(mb,i)->recycle = -1;
> + if (getInstrPtr(mb,i)->recycle)
> + getInstrPtr(mb,i)->recycle = -1;
> mal_unset_lock(recycleLock,"recycle");
> }
> mb->version = recycleVersion;
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Monetdb-checkins mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/monetdb-checkins
--
| Dr. Stefan Manegold | mailto:[EMAIL PROTECTED] |
| CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ |
| 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 |
| The Netherlands | Fax : +31 (20) 592-4312 |
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Monetdb-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-developers