Jump to content

Archived

This topic is now archived and is closed to further replies.

Luth

mysql_query(...) hangs forever when I insert 'The Forest', but not 'Forest' or 'The Scary Forest'

Recommended Posts

I've got a head scratcher for you. I was adding values into my rooms table from a php script that read a Rooms.txt file, created the query statement, and called mysql_query. The final room in Rooms.txt was "The Forest". When it got to INSERTing that room, it would freeze forever. If I did the SQL query by hand (via phpmyadmin), it would accept it, but not if I called it from the PHP script.

Here's the statement that would hang forever:
INSERT INTO `rooms` ( `ID` , `Name` , `Description`, `Exit_1` ) VALUES ( 5, 'The Forest', 'Its dangerous to be out here alone. Who knows what could be lurking to eat up a small child like you.', 0 )

So here's the confusing part: If I change "The Forest" to ANYTHING else (such as "Forest" or "The Scary Forest"), it works.
IE, this worked:
INSERT INTO `rooms` ( `ID` , `Name` , `Description`, `Exit_1` ) VALUES ( 5, 'The Scary Forest', 'Its dangerous to be out here alone. Who knows what could be lurking to eat up a small child like you.', 0 )

This worked too:
INSERT INTO `rooms` ( `ID` , `Name` , `Description`, `Exit_1` ) VALUES ( 5, 'The Scary Forest', 'Its dangerous to be out here alone. Who knows what could be lurking to eat up a small child like you.', 0 )


Why on earth would, specifically, 'The Forest' cause the query to hang up indefinately, do you think?

Share this post


Link to post
Share on other sites
No one's ever had a case where INSERTing into a table caused a freeze up? I cant imagine that I'm the only one to ever encounter this would-be bug. [img src=\"style_emoticons/[#EMO_DIR#]/unsure.gif\" style=\"vertical-align:middle\" emoid=\":unsure:\" border=\"0\" alt=\"unsure.gif\" /]

Share this post


Link to post
Share on other sites
First, double check your work... sometimes we get blinded by our screen and miss the obvious...

that being said, welcome to the dark side of open source... sometimes things happen... although rare for mysql/php

I found a bug a while back that did make sense... I Believe Barand restored my sanity by giving me a link to the buglist... so I did a workaround...

I would say, chances are, you have missed something... Go get a cup of coffee, look outside at the bird on the front lawn, then go back to it... you may find it...

Works for me!

Share this post


Link to post
Share on other sites
Yeah, I went to bed, slept 8 hours, got back up, same result. :-/

'The Forest' causes it to hang, but simply write ' Scary' after "The" (making it 'The Scary Forest'), and do NOTHING ELSE, and its fine. No hangups, no freezing, all A-OK.

:-/ SQL just doesnt like The Forest.

Share this post


Link to post
Share on other sites
I'd like to try and re-create the problem on my system... I'd need your table structure, and your script that is having the problem...

[!--quoteo(post=384340:date=Jun 15 2006, 03:53 PM:name=Luth)--][div class=\'quotetop\']QUOTE(Luth @ Jun 15 2006, 03:53 PM) [snapback]384340[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Yeah, I went to bed, slept 8 hours, got back up, same result. :-/

'The Forest' causes it to hang, but simply write ' Scary' after "The" (making it 'The Scary Forest'), and do NOTHING ELSE, and its fine. No hangups, no freezing, all A-OK.

:-/ SQL just doesnt like The Forest.
[/quote]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.