Ferenc Engard wrote:
> > You'll have to turn on mysql logging to see what is being asked and see
> > if the request differs. MMP + midgard-lib (latest CVS) have facilities
>
> Unfortunately now it fails at 50%. YES, I have found difference in the
> SQL statement; it identifies the sitegroup badly. The company which the
> page belongs to, is placed in sitegroup 1.
>
> Here, I copy the whole log-part for a bad query, and (after pushing
> simply a few refresh to the browser) a good query.
>
> BAD:
> ------------------------------------------------------------
> 020302 18:50:09 73 Init DB midgard
> 73 Statistics
> 73 Query SELECT
> id,style,root,info&1,Length(prefix),sitegroup FROM host WHERE
> name='www.informed.hu' AND port IN (0,8001) AND
> prefix=Left('/informed/felvitel/',Length(prefix)) AND
> IF(19>=Length(prefix),MID('/informed/felvitel/',1+Length(prefix),1) IN
> ('','/'),0)=1 AND online=1 ORDER BY prefix DESC, port DESC
If this returns the correct values for all fields except the
sitegroup... I don't know, but since we accept the returned values
as-is, I have no idea where we would fix this. If we can't trust the
database to return the correct values...
Maybe you could insert a log statement that displays the sitegroup
directly after having fetched it (see attachment). You could also try
MMP to see if it behaves better (above queries are from non-MMP).
Emile
Index: mod_midgard.c
===================================================================
RCS file: /usr/local/cvs/midgard/mod/mod_midgard.c,v
retrieving revision 1.102
diff -u -u -r1.102 mod_midgard.c
--- mod_midgard.c 2002/01/26 15:36:17 1.102
+++ mod_midgard.c 2002/03/02 21:57:47
@@ -720,6 +720,10 @@
#if HAVE_MIDGARD_SITEGROUPS
ftstatus->sitegroup = atoi(mgd_colvalue(res, 5));
mgd_set_sitegroup(rcfg->mgd, ftstatus->sitegroup);
+ fprintf(stderr, "http://%s:%d%s maps to host %d in SG %d\n",
+ ap_get_server_name(rcfg->req),
+ ap_get_server_port(rcfg->req),
+ rcfg->req->uri, rcfg->host, ftstatus->sitegroup);
#endif
if (prelen == 0) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]