Gossamer Forum
Home : Products : Gossamer Links : Discussions :

error with repair table

Quote Reply
error with repair table
Hi,

I have a error with the repair tool:

Checking for orphan links ...


A fatal error has occured:
Can't call method "fetchrow_hashref" on an undefined value at (eval 17) line 11.


Please enable debugging in setup for more details.

' Reason: The SELECT would examine too many records and probably take a very long time. Check your WHERE and use SET OPTION SQL_BIG_SELECTS=1 if the SELECT is ok


What does this mean and what is to do?

best regards



eljot
Quote Reply
Re: [eljot] error with repair table In reply to
Looks like you need to hack part of Links SQL. Could you enable debugging, and show us the last function calls?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] error with repair table In reply to
hello andy,

here is the complete list of Stack Trace:

Stack Trace
======================================
Links (16777): Links::environment called at /home/eljot/public_html/cgi-bin/admin/Links.pm line 431 with no arguments.
Links (16777): Links::fatal called at (eval 17) line 11 with arguments
(Can't call method "fetchrow_hashref" on an undefined value at (eval 17) line 11.
).
Links (16777): Links::Build::build_orphan_check called at /home/eljot/public_html/cgi-bin/admin/GT/Plugins.pm line 108 with arguments
(HASH(0x84f9678)).
Links (16777): GT::Plugins::dispatch called at /home/eljot/public_html/cgi-bin/admin/Links/Build.pm line 30 with arguments
(GT::Plugins, /home/eljot/public_html/cgi-bin/admin/Plugins, build_orphan_check, *Links::Build::build_orphan_check, HASH(0x84f9678)).
Links (16777): Links::Build::build called at /home/eljot/public_html/cgi-bin/admin/nph-build.cgi line 634 with arguments
(orphan_check, HASH(0x84f9678)).
Links (16777): main::_build_orphan_check called at /home/eljot/public_html/cgi-bin/admin/nph-build.cgi line 237 with no arguments.
Links (16777): main::build_repair called at /home/eljot/public_html/cgi-bin/admin/nph-build.cgi line 42 with no arguments.
Links (16777): main::main called at /home/eljot/public_html/cgi-bin/admin/nph-build.cgi line 30 with no arguments.

thanks

eljot
Quote Reply
Re: [eljot] error with repair table In reply to
Mmm...in admin/Links/Build.pm , find the sub 'build_orphan_check' , and comment out;

my $sth = $rel->select ('left_join', $sel, GT::SQL::Condition->new('LinkID', 'IS', \'NULL'));

...and add;

my $table= $rel->select_options ('SET OPTION SQL_BIG_SELECTS=1');
my $sth = $table->select ('left_join', $sel, GT::SQL::Condition->new('LinkID', 'IS', \'NULL'));

I'm not definate this will work, which is why I asked you to comment out the first line, rather than delete it. Then if it doesn't work, you can always uncomment it, and remove my codes Tongue

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] error with repair table In reply to
Thanks andy,

it does not works:

Links (32637): Links::environment called at /home/eljot/public_html/cgi-bin/admin/Links.pm line 431 with no arguments.
Links (32637): Links::fatal called at (eval 17) line 11 with arguments
(Can't call method "select" on unblessed reference at (eval 17) line 11.
).
Links (32637): Links::Build::build_orphan_check called at /home/eljot/public_html/cgi-bin/admin/GT/Plugins.pm line 108 with arguments
(HASH(0x84fb5b8)).
Links (32637): GT::Plugins::dispatch called at /home/eljot/public_html/cgi-bin/admin/Links/Build.pm line 30 with arguments
(GT::Plugins, /home/eljot/public_html/cgi-bin/admin/Plugins, build_orphan_check, *Links::Build::build_orphan_check, HASH(0x84fb5b8)).
Links (32637): Links::Build::build called at /home/eljot/public_html/cgi-bin/admin/nph-build.cgi line 634 with arguments
(orphan_check, HASH(0x84fb5b8)).
Links (32637): main::_build_orphan_check called at /home/eljot/public_html/cgi-bin/admin/nph-build.cgi line 237 with no arguments.
Links (32637): main::build_repair called at /home/eljot/public_html/cgi-bin/admin/nph-build.cgi line 42 with no arguments.
Links (32637): main::main called at /home/eljot/public_html/cgi-bin/admin/nph-build.cgi line 30 with no arguments.


regards

eljot
Quote Reply
Re: [eljot] error with repair table In reply to
I wouldn't recommend changing the core code. You need to find out the reason behind the error. I've repaired Links SQL with over 500,000 links and didn't receive an error like this.

How many links do you have?
Quote Reply
Re: [Paul] error with repair table In reply to
Hello Paul,

I have only 4800 Links but 35 fields for each link.
I Have also a problem with the email to owner where I get a fatal error. should I ask my provider if there are any limitations in my sql options?

best regards
eljot
Quote Reply
Re: [eljot] error with repair table In reply to
That would be a good starting point. You certainly shouldn't be getting this error with only 5000 links.
Quote Reply
Re: [Paul] error with repair table In reply to
I've asked my provider and he say that I have to add

SET OPTION SQL_BIG_SELECTS=1

before the big_query but where is it?

Best regards from
Bremen/Germany

Lothar
Quote Reply
Re: [eljot] error with repair table In reply to
Hi,

I would strongly recommend getting your ISP to upgrade MySQL. You are running a very old version.

You can insert the SQL into the code by adding:

$DB->table('Links')->do_query("SET OPTION SQL_BIG_SELECTS=1");

right before:

my $rel = $DB->table('Links', 'CatLinks');

in Links/Build.pm around line 670.

Again, I'd highly recommend a MySQL upgrade, this isn't neccessary on most modern MySQL installations.

Cheers,

Alex
--
Gossamer Threads Inc.