Jump to content


Photo

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


  • Please log in to reply
4 replies to this topic

#1 Luth

Luth
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 15 June 2006 - 08:57 AM

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?

#2 Luth

Luth
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 15 June 2006 - 06:41 PM

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\" /]

#3 AV1611

AV1611
  • Members
  • PipPipPip
  • Advanced Member
  • 997 posts

Posted 15 June 2006 - 06:46 PM

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!



#4 Luth

Luth
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 15 June 2006 - 07:53 PM

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.

#5 AV1611

AV1611
  • Members
  • PipPipPip
  • Advanced Member
  • 997 posts

Posted 19 June 2006 - 12:09 PM

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) View Post[/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]





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users