cvs annotate says it's emile's code. emile?

.. david

Marcin Sołtysiak wrote:

old mod_midgard, mod_midgard.c, line 1045.

and it does look funky to me...


I got a problme with mysql and midgard. From time to time one or


several

apache proceses go into a starnge stage when they perform only one


query

to

mysql and they do is some thousands times a second. The query is:

1 Query SELECT style,up FROM page WHERE id=0

what is quite out of sense since there is no page with id=0;



OK. I've read the source a bit and I don't get one thing...


                /* traverse the tree to find the style! */
                up = atoi(mgd_colvalue(res, 5));
                while (!up && !rcfg->style) {
                        resb =
                           mgd_ungrouped_record(rcfg->mgd, "style,up",
"page",
                                                up);
*                        up = atoi(mgd_colvalue(res, 1));
*                        if ((tmp = atoi(mgd_colvalue(res, 0))) != 0) {
                                rcfg->style = tmp;
                        }
                }

Shouldn't lines with asterisk refer to resb, the one we try to get one line
before? When they refer to res the whole while loop means nothing does it?


Solt


that's what i thought, and isn't the while (!up ..) part strange too? means that the loop only gets executed if up == 0.


david

-
David Schmitter, CMS Developer, [EMAIL PROTECTED]
Dataflow Solutions GmbH - Pappelweg 48 - 3013 CH-Bern
[EMAIL PROTECTED] - +41 31 332 01 01


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




--
David Schmitter, CMS Developer, [EMAIL PROTECTED]
Dataflow Solutions GmbH - Pappelweg 48 - 3013 CH-Bern
[EMAIL PROTECTED] - +41 31 332 01 01


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to