[SOLVED] Fatal MySQ...
 
Notifications
Clear all

[SOLVED] Fatal MySQL error, Error: (1104) The SELECT would examine more rows...

9 Posts
3 Users
0 Reactions
1,682 Views
(@saturn)
Posts: 45
Eminent Member
Topic starter
 

URL to your eFiction: http://www.spntwisted.com/
Version of eFiction: 3.2.1
Have you bridged eFiction, if so with what?: no
Version of PHP: can be found out from your host
Version of MySQL: can be found out from your host
Have you searched for your problem: yes
If so, what terms did you try: I tried various parts of my error message to see if anything was similar. Then I just browsed the most recent 18 pages of problems and checked any I thought might be relevant.
State the nature of your problem: On some of my older stories you get this error message: A fatal MySQL error was encountered.
Query: SELECT count( stories.sid ) as stories, author.penname as penname, author.uid as uid FROM fanfiction_authors as author LEFT JOIN fanfiction_authorprefs AS ap ON author.uid = ap.uid LEFT JOIN fanfiction_stories AS stories ON stories.validated > 0 AND (FIND_IN_SET(author.uid, stories.coauthors) > 0 OR stories.uid = author.uid) WHERE FIND_IN_SET(stories.uid, '3') > 0 GROUP BY stories.uid
Error: (1104) The SELECT would examine more rows than MAX_JOIN_SIZE. Check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is ok

And it's only certain stories. For example this story gets the error: http://www.spntwisted.com/viewstory.php?sid=137
But this one by the same author does not: http://www.spntwisted.com/viewstory.php?sid=188

I tried to copy and paste one of the stories and repost it under the author's name using the admin add story feature but it gave me the same error. I also tried to add a chapter to one of the problem stories which made the story show up...except the chapter I added gave the error.

It seems to be only on some of the older stories. I am planning to update to the newest version but wanted to make sure this wouldn't cause a problem before I did it. I did attempt to upgrade (3.3 or 3.4 I think) a while back with some trouble and just went back to the version I am using.

Do you have a test account for us? yes just PM me.

EDIT: I forgot to add that as an admin I can can edit the story and see story, summary, notes etc and everything works fine. It's only when you actually click on the story to read it that you get the error.


My site: www.spntwisted.com
eFiction: 3.5.1
Have you bridged eFiction?: no
PHP Version 4.3.11
MySQL: 5.0
Mods? Recommendations mod, Story End mod, Beta Reader mod, challenges mod

 
Posted : 01/09/2009 10:41 pm
(@tammy)
Posts: 2577
Member Moderator
 

I would suggest you upgrade.  It's the coauthor information that's probably causing the error and that's changed since 3.3.


 
Posted : 01/09/2009 11:05 pm
(@saturn)
Posts: 45
Eminent Member
Topic starter
 

I upgraded and still get the same problem. However I did notice that the error now says:

A fatal MySQL error was encountered.
Query: SELECT author.penname as penname, author.uid as uid, ap.stories FROM fanfiction_authors as author LEFT JOIN fanfiction_authorprefs AS ap ON author.uid = ap.uid WHERE FIND_IN_SET(stories.uid, '3') > 0 GROUP BY stories.uid
Error: (1109) Unknown table 'stories' in where clause


My site: www.spntwisted.com
eFiction: 3.5.1
Have you bridged eFiction?: no
PHP Version 4.3.11
MySQL: 5.0
Mods? Recommendations mod, Story End mod, Beta Reader mod, challenges mod

 
Posted : 03/09/2009 6:16 am
(@lyndsie)
Posts: 1263
Member Moderator
 

What versions of PHP and MySQL do you have?

ETA: I've been looking through the files for 3.5.1 and I can't find anything that looks like that query. I suggest making sure you've got all the files really updated. Sometimes FTP/upload programs can leave stuff out. (It's also late so it could be on my end.)

Without seeing the context it's kind of hard to say, but that query looks a little odd. There's no field ap.stories in fanfiction_authors so I'd guess it's supposed to be 'ap.stories as stories' or something like that. Even so, until I can find the section of code in the files I can't play with it to see what's happening. It's also odd that it's happening on some stories and not others, by the same author even, so I'd also suggest trying all the recalculation tools in Admin > Archive Maintenance just in case.

Further ETA: Do you have the story end module installed? Or something else like that? If so I think that's the issue. The error is appearing on the last chapter of each story that I checked. (Which also happens to be the first chapter of the one chapter stories, which is why I didn't notice it earlier.) If it's Tammy's Story End module you can see if there's a newer version at her site (hugosnebula.com) and check there for bugs and such.


 
Posted : 03/09/2009 6:17 am
(@tammy)
Posts: 2577
Member Moderator
 

What page are you getting this new error on?  Seems to be a missing tableprefix call somewhere.


 
Posted : 03/09/2009 11:56 am
(@saturn)
Posts: 45
Eminent Member
Topic starter
 

I updated the story end module and it seems to have fixed the problem. I'll check more thoroughly tonight when I have a chance.


My site: www.spntwisted.com
eFiction: 3.5.1
Have you bridged eFiction?: no
PHP Version 4.3.11
MySQL: 5.0
Mods? Recommendations mod, Story End mod, Beta Reader mod, challenges mod

 
Posted : 03/09/2009 12:00 pm
(@saturn)
Posts: 45
Eminent Member
Topic starter
 

Seems to be fine other than a duplicate entry of x is the author of 9 other stories. That's a different problem for a different day though. πŸ™‚


My site: www.spntwisted.com
eFiction: 3.5.1
Have you bridged eFiction?: no
PHP Version 4.3.11
MySQL: 5.0
Mods? Recommendations mod, Story End mod, Beta Reader mod, challenges mod

 
Posted : 04/09/2009 11:51 am
(@tammy)
Posts: 2577
Member Moderator
 

Use phpmyadmin to delete the duplicate codeblock for the storyend module.


 
Posted : 06/09/2009 1:04 am
(@saturn)
Posts: 45
Eminent Member
Topic starter
 

Thanks. πŸ™‚


My site: www.spntwisted.com
eFiction: 3.5.1
Have you bridged eFiction?: no
PHP Version 4.3.11
MySQL: 5.0
Mods? Recommendations mod, Story End mod, Beta Reader mod, challenges mod

 
Posted : 06/09/2009 1:58 pm
Share: