Back to the month index |
Back to the list index
|
Sverre Johan Tøvik (Sverre.J.Tovik@hiMolde.no)
Wed, 21 Apr 1999 15:15:17 +0200
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: Sverre Johan Tøvik: "mmap beats msql2d to death with a sig 11"
- Previous message: Manfred Fandel: "msqlDateOffset function is buggy"
Message-Id: <l03130300b34379708e73@[158.38.68.233]> Date: Wed, 21 Apr 1999 15:15:17 +0200 From: Sverre Johan Tøvik <Sverre.J.Tovik@hiMolde.no> Subject: Solution ( it´s-a-bug ): w3-msql crashes on select which works in monitorHi,
I've now found out what the problem is, and I believe it to be a quite ugly
bug. Before the (previously) problematic query, I have two other queries.
Both of them are table joins, so I've used table aliasing to make the
queries a bit easier to work with. Now, while trying to find out exactly
what was making that third query crash, I tried replacing the third query
with the second (thinking that maybe w3-msql couldn't cope with more than
two queries in a "script"...). But that worked... So I began taking away
pieces of the copied query - and it continued to work. Until I took away
almost everything, changing the query to "SELECT * FROM [table]" (thinking
that maybe there was some bug with the table in the (original) third query)
- and it crashed again. I then tried something seemingly irrelevant - I
added an alias to the query (which now read "SELECT * FROM [table] = [t]")
- and it worked!
So, my conclusion is that if you use table aliasing in _one_ of the queries
in a script, you _must_ use it in all other queries. (At least, that's how
it works for me... I had another script (page) where it was the other way
round - first a query without aliasing, and then one with aliasing, and it
crashed on the second query until I added aliasing to the first...)
I still have crashing problems... Read more about that in "mmap beats
msql2d to death with a sig 11"...
Regards,
Sverre Johan Toevik
>Hi again,
>
>I just noticed that the console, when msql2d goes down, says:
>***
>mmap: Not enough space
>
>Hit by a sig 11
>
>
>
>Forced server shutdown due to bad signal!
>
>Forcing close on Socket 4
>***
>
>I still don't understand what's happening... "top" says:
>Memory: 29864K (10380K) real, 71620K (33340K) virtual, 2200K free Page# 1/9
>
>How can there not be enough space? And how come this doesn't happen on
>other queries (much "bigger" ones too...)?
>
>Again, I hope someone can help...
>
>Thanks in advance!
>
>
>Regards,
>
>Sverre Johan Toevik
>CS Student, Molde College, Norway
>
>>Hi,
>>
>>I'm having a (pretty weird) problem with a particular select clause that
>>brings down msql2d when used in w3-msql, while it works fine in msql
>>monitor (as it should).
>>
>>(Actually, it seems to "go away" pretty much at random elsewhere also, but
>>with this particular select clause it happens _every_ time.)
>>
>>My setup is mSQL 2.0.8 on HP-UX 10.20.
>>
>>The select clause is "SELECT problem_lost FROM rapport_link WHERE
>>problemrapport_id = 3".
>>
>>Here's how it looks in my w3-msql file:
>>***
>>if (msqlQuery($sock, "SELECT problem_lost FROM rapport_link WHERE
>>problemrapport_id = 3") < 0)
>>{
>> echo("ERROR (problem_lost lookup) : $ERRMSG\n");
>>}
>>***
>>
>>And in case there should be any question about it, the HTML output is:
>>"ERROR (problem_lost lookup) : MSQL server has gone away"
>>
>>(In case anyone's wondering; No, it's not very useful to have a hardcoded
>>select clause. The number 3 is there in place of a path arg to the page. I
>>did this just to rule out the possibility of this (the path arg, that is)
>>being the problem.)
>>
>>mSQL Dump of the table follows below... Although the field names won't make
>>much sense to anyone who doesn't happen to know Norwegian, the table and
>>the select is so simple it shouldn't really matter...
>>
>>I hope someone can help me with this... I can actually work around this (so
>>that I don't need this particular select), but I don't feel safe not
>>knowing what is happening... I mean, if it goes down because of something
>>this simple... :-)
>>
>>Thanks in advance!
>>
>>
>>Regards,
>>
>>Sverre Johan Toevik
>>CS Student, Molde College, Norway
>>
>>
>>*********************************************************
>>
>>#
>># mSQL Dump (requires mSQL 2.0 Beta 5 or newer)
>>#
>># Host: localhost Database: driftsnett
>>#--------------------------------------------------------
>>
>>
>>#
>># Table structure for table 'rapport_link'
>>#
>>CREATE TABLE rapport_link (
>> problemrapport_id INT NOT NULL,
>> arbeidsrapport_id INT NOT NULL,
>> problem_lost INT NOT NULL
>>) \g
>>
>>CREATE INDEX link_arbeid_idx ON rapport_link (
>> arbeidsrapport_id
>>) \g
>>
>>CREATE INDEX link_problem_idx ON rapport_link (
>> problemrapport_id
>>) \g
>>
>>
>>#
>># Dumping data for table 'rapport_link'
>>#
>>
>>INSERT INTO rapport_link VALUES (3,4,0)\g
>>INSERT INTO rapport_link VALUES (1,4,1)\g
>>INSERT INTO rapport_link VALUES (2,5,0)\g
<disclaimer> I speak for myself only! </disclaimer>
"to be yourself, in a world that tries, night and day, to make you just
like everybody else - is to fight the greatest battle there ever is to
fight, and never stop fighting" -- e.e. cummings
- Next message: Sverre Johan Tøvik: "mmap beats msql2d to death with a sig 11"
- Previous message: Manfred Fandel: "msqlDateOffset function is buggy"