Luth Posted June 15, 2006 Share Posted June 15, 2006 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? Quote Link to comment https://forums.phpfreaks.com/topic/12055-mysql_query-hangs-forever-when-i-insert-the-forest-but-not-forest-or-the-scary-forest/ Share on other sites More sharing options...
Luth Posted June 15, 2006 Author Share Posted June 15, 2006 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\" /] Quote Link to comment https://forums.phpfreaks.com/topic/12055-mysql_query-hangs-forever-when-i-insert-the-forest-but-not-forest-or-the-scary-forest/#findComment-46033 Share on other sites More sharing options...
AV1611 Posted June 15, 2006 Share Posted June 15, 2006 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/phpI 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! Quote Link to comment https://forums.phpfreaks.com/topic/12055-mysql_query-hangs-forever-when-i-insert-the-forest-but-not-forest-or-the-scary-forest/#findComment-46034 Share on other sites More sharing options...
Luth Posted June 15, 2006 Author Share Posted June 15, 2006 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 Link to comment https://forums.phpfreaks.com/topic/12055-mysql_query-hangs-forever-when-i-insert-the-forest-but-not-forest-or-the-scary-forest/#findComment-46057 Share on other sites More sharing options...
AV1611 Posted June 19, 2006 Share Posted June 19, 2006 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] Quote Link to comment https://forums.phpfreaks.com/topic/12055-mysql_query-hangs-forever-when-i-insert-the-forest-but-not-forest-or-the-scary-forest/#findComment-47271 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.