Database integrity check

Is there a command I can run to make sure the database has all the correct
tables in it? I’ve just upgraded to 3.0.3pre1, and DBIx::SearchBuilder
0.83_02 and am noticing sever performance problems, much much worse than
before (now I can’t even get to the login screen) and I want to check that I
haven’t done anything silly during the upgrade.

jaq@spacepants.org http://spacepants.org/jaq.gpg

Can you try backing down that Searchbuilder down to the last release?
Perl modules with _ in the version string are “dev version, use at your
own risk”. CPAN won’t auto-install them for you.

-jOn Fri, May 30, 2003 at 02:26:13PM +1000, Jamie Wilkinson wrote:

Is there a command I can run to make sure the database has all the correct
tables in it? I’ve just upgraded to 3.0.3pre1, and DBIx::SearchBuilder
0.83_02 and am noticing sever performance problems, much much worse than
before (now I can’t even get to the login screen) and I want to check that I
haven’t done anything silly during the upgrade.


jaq@spacepants.org http://spacepants.org/jaq.gpg


rt-devel mailing list
rt-devel@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-devel

http://www.bestpractical.com/rt – Trouble Ticketing. Free.

This one time, at band camp, Jesse Vincent wrote:

Can you try backing down that Searchbuilder down to the last release?
Perl modules with _ in the version string are “dev version, use at your
own risk”. CPAN won’t auto-install them for you.

I rolled back to 0.81_03, which I had been using. I’ll install the latest
stable version and see what happens. I’ve also rolled back RT to 3.0.1 and
things are working again, so I don’t think I’ve broken the database…
though if you’d like a feature request, a “make dbcheck” target that checks
your database schema matches the schema file would be great.

jaq@spacepants.org http://spacepants.org/jaq.gpg

This one time, at band camp, Jesse Vincent wrote:

Can you try backing down that Searchbuilder down to the last release?
Perl modules with _ in the version string are “dev version, use at your
own risk”. CPAN won’t auto-install them for you.

I rolled back to 0.81_03, which I had been using. I’ll install the latest
stable version and see what happens. I’ve also rolled back RT to 3.0.1 and
things are working again, so I don’t think I’ve broken the database…

Did you test with only one part rolled back? It’s hard for me to debug
something when you change two big things at once.

though if you’d like a feature request, a “make dbcheck” target that checks
your database schema matches the schema file would be great.

Do you have a recommendation of any code that can actually do this?


jaq@spacepants.org http://spacepants.org/jaq.gpg


rt-devel mailing list
rt-devel@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-devel

http://www.bestpractical.com/rt – Trouble Ticketing. Free.

This one time, at band camp, Jamie Wilkinson wrote:

This one time, at band camp, Jesse Vincent wrote:

Can you try backing down that Searchbuilder down to the last release?
Perl modules with _ in the version string are “dev version, use at your
own risk”. CPAN won’t auto-install them for you.

I rolled back to 0.81_03, which I had been using. I’ll install the latest
stable version and see what happens. I’ve also rolled back RT to 3.0.1 and
things are working again, so I don’t think I’ve broken the database…
though if you’d like a feature request, a “make dbcheck” target that checks
your database schema matches the schema file would be great.

I just installed DBIx::SearchBuilder 0.82 and was greeted with this error
message:

error: Can’t locate object method “dbh” via package “RT::Tickets” at
/usr/lib/perl5/site_perl/5.8.0/DBIx/SearchBuilder.pm line 1302.
context: …
277: }
278:
279: # All errors returned from this subroutine will be in exception
form
280: local $SIG{‘DIE’} = sub {
281: rethrow_exception($_[0]);
282: };
283:
284: #
285: # $m is a dynamically scoped global containing this

code stack: /usr/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm:281
/usr/lib/perl5/site_perl/5.8.0/DBIx/SearchBuilder.pm:1302
/usr/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm:1049

Still with RT 3.0.1, this was whilst loading the front page after an apache
restart.

jaq@spacepants.org http://spacepants.org/jaq.gpg

This one time, at band camp, Jesse Vincent wrote:

This one time, at band camp, Jesse Vincent wrote:

Can you try backing down that Searchbuilder down to the last release?
Perl modules with _ in the version string are “dev version, use at your
own risk”. CPAN won’t auto-install them for you.

I rolled back to 0.81_03, which I had been using. I’ll install the latest
stable version and see what happens. I’ve also rolled back RT to 3.0.1 and
things are working again, so I don’t think I’ve broken the database…

Did you test with only one part rolled back? It’s hard for me to debug
something when you change two big things at once.

though if you’d like a feature request, a “make dbcheck” target that checks
your database schema matches the schema file would be great.

Do you have a recommendation of any code that can actually do this?

Heh, no. I’m thinking of something that looks at the schema file and then
calls Pg or mysql metacommands to check the schema of the table in the
database. Of course, I’d be surprised if a CPAN module hasn’t already been
written that does this :wink:

Wishlist, of course.

jaq@spacepants.org http://spacepants.org/jaq.gpg

This one time, at band camp, Jesse Vincent wrote:

Did you test with only one part rolled back? It’s hard for me to debug
something when you change two big things at once.

Well, unfortunately I broke that rule by upgrading two things at once, and
when something broke, I had to roll back both. I’m now testing this, so
I’ll give you some clearer results soon.

jaq@spacepants.org http://spacepants.org/jaq.gpg

Jesse,
I received the error same sort of error as reported by Jamie. This
ONLY occurs when the ‘DESTROY’ method of SearchBuilder.pm is present.
Commenting it out gives the same behaviour as previous versions of RT.

I have observed this problem with RT3.0.2 and RT3.0.3pre1. I am running
RT under Mod_Perl 1.99_09 which could be a contributing factor if
Mod_Perl 1.27 users aren’t experiencing this.

Full error message below.

-BrookOn Friday, May 30, 2003, at 03:01 PM, Jamie Wilkinson wrote:

This one time, at band camp, Jamie Wilkinson wrote:

This one time, at band camp, Jesse Vincent wrote:

Can you try backing down that Searchbuilder down to the last release?
Perl modules with _ in the version string are “dev version, use at
your
own risk”. CPAN won’t auto-install them for you.

I rolled back to 0.81_03, which I had been using. I’ll install the
latest
stable version and see what happens. I’ve also rolled back RT to
3.0.1 and
things are working again, so I don’t think I’ve broken the database…
though if you’d like a feature request, a “make dbcheck” target that
checks
your database schema matches the schema file would be great.

I just installed DBIx::SearchBuilder 0.82 and was greeted with this
error
message:

error: Can’t locate object method “dbh” via package “RT::Tickets” at
/usr/lib/perl5/site_perl/5.8.0/DBIx/SearchBuilder.pm line 1302.
context: …
277: }
278:
279: # All errors returned from this subroutine will be in
exception
form
280: local $SIG{‘DIE’} = sub {
281: rethrow_exception($_[0]);
282: };
283:
284: #
285: # $m is a dynamically scoped global containing this

code stack: /usr/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm:281
/usr/lib/perl5/site_perl/5.8.0/DBIx/SearchBuilder.pm:1302
/usr/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm:1049

Still with RT 3.0.1, this was whilst loading the front page after an
apache
restart.


jaq@spacepants.org
http://spacepants.org/jaq.gpg


rt-devel mailing list
rt-devel@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-devel

System error
error: Can’t locate object method “dbh” via package “RT::Queues” at
/usr/local/lib/perl5/site_perl/5.8.0/DBIx/SearchBuilder.pm line 1302.
context:

277: }
278:
279: # All errors returned from this routine will be in exception
form.
280: local $SIG{‘DIE’} = sub {
281: rethrow_exception( $_[0] );
282: };
283:
284: #
285: # $m is a dynamically scoped global containing this

code stack:
/usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm:281
/usr/local/lib/perl5/site_perl/5.8.0/DBIx/SearchBuilder.pm:1302
/usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm:1049
/opt/rt3/share/html/Elements/CreateTicket:25
/opt/rt3/share/html/Elements/Tabs:37
/opt/rt3/share/html/index.html:25
/opt/rt3/share/html/autohandler:158
raw error

Can’t locate object method “dbh” via package “RT::Queues” at
/usr/local/lib/perl5/site_perl/5.8.0/DBIx/SearchBuilder.pm line 1302.

Trace begun at
/usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Exceptions.pm line 123
HTML::Mason::Exceptions::rethrow_exception(‘Can’t locate object method
"dbh" via package “RT::Queues” at
/usr/local/lib/perl5/site_perl/5.8.0/DBIx/SearchBuilder.pm line
1302.^J’) called at
/usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 281
HTML::Mason::Request::ANON(‘Can’t locate object method “dbh” via
package “RT::Queues” at
/usr/local/lib/perl5/site_perl/5.8.0/DBIx/SearchBuilder.pm line
1302.^J’) called at
/usr/local/lib/perl5/site_perl/5.8.0/DBIx/SearchBuilder.pm line 1302
DBIx::SearchBuilder::DESTROY(‘RT::Queues=HASH(0xd8df20)’) called at
/usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 1049
eval {…}(‘RT::Queues=HASH(0xd8df20)’) called at
/usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 1049
HTML::Mason::Request::comp(‘HTML::Mason::Request::ApacheHandler=HASH(0x8
63244)’, ‘HASH(0x1349b4c)’, ‘/Elements/SelectNewTicketQueue’) called at
/usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 1087
HTML::Mason::Request::scomp(‘HTML::Mason::Request::ApacheHandler=HASH(0x
863244)’, ‘/Elements/SelectNewTicketQueue’) called at
/opt/rt3/share/html/Elements/CreateTicket line 25
HTML::Mason::Commands::ANON at
/usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Component.pm line 133
HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x13
4f51c)’) called at
/usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 1045
eval {…}(‘HTML::Mason::Component::FileBased=HASH(0x134f51c)’) called
at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 1039
HTML::Mason::Request::comp(‘HTML::Mason::Request::ApacheHandler=HASH(0x8
63244)’, ‘HASH(0x1347b5c)’, ‘/Elements/CreateTicket’) called at
/usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 1087
HTML::Mason::Request::scomp(‘HTML::Mason::Request::ApacheHandler=HASH(0x
863244)’, ‘/Elements/CreateTicket’) called at
/opt/rt3/share/html/Elements/Tabs line 37
HTML::Mason::Commands::ANON(‘current_toptab’, ‘’, ‘Title’, ‘RT at a
glance’) called at
/usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Component.pm line 133
HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x12
acc94)’, ‘current_toptab’, ‘’, ‘Title’, ‘RT at a glance’) called at
/usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 1045
eval {…}(‘HTML::Mason::Component::FileBased=HASH(0x12acc94)’,
‘current_toptab’, ‘’, ‘Title’, ‘RT at a glance’) called at
/usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 1039
HTML::Mason::Request::comp(‘HTML::Mason::Request::ApacheHandler=HASH(0x8
63244)’, ‘/Elements/Tabs’, ‘current_toptab’, ‘’, ‘Title’, ‘RT at a
glance’) called at /opt/rt3/share/html/index.html line 25
HTML::Mason::Commands::ANON(‘Error’, ‘Your username or password is
incorrect’, ‘pass’, ‘password’, ‘user’, ‘root’, ‘Error’, ‘Your username
or password is incorrect’, ‘pass’, ‘password’, ‘user’, ‘root’) called
at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Component.pm line 133
HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0xff
38f0)’, ‘Error’, ‘Your username or password is incorrect’, ‘pass’,
‘password’, ‘user’, ‘root’, ‘Error’, ‘Your username or password is
incorrect’, ‘pass’, ‘password’, ‘user’, ‘root’) called at
/usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 1045
eval {…}(‘HTML::Mason::Component::FileBased=HASH(0xff38f0)’, ‘Error’,
‘Your username or password is incorrect’, ‘pass’, ‘password’, ‘user’,
‘root’, ‘Error’, ‘Your username or password is incorrect’, ‘pass’,
‘password’, ‘user’, ‘root’) called at
/usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 1039
HTML::Mason::Request::comp(‘HTML::Mason::Request::ApacheHandler=HASH(0x8
63244)’, ‘HTML::Mason::Component::FileBased=HASH(0xff38f0)’, ‘Error’,
‘Your username or password is incorrect’, ‘pass’, ‘password’, ‘user’,
‘root’, ‘Error’, ‘Your username or password is incorrect’, ‘pass’,
‘password’, ‘user’, ‘root’) called at
/usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 735
HTML::Mason::Request::call_next(‘HTML::Mason::Request::ApacheHandler=HAS
H(0x863244)’, ‘Error’, ‘Your username or password is incorrect’,
‘pass’, ‘password’, ‘user’, ‘root’) called at
/opt/rt3/share/html/autohandler line 158
HTML::Mason::Commands::ANON(‘Error’, ‘Your username or password is
incorrect’, ‘pass’, ‘password’, ‘user’, ‘root’) called at
/usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Component.pm line 133
HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0xff
90a8)’, ‘Error’, ‘Your username or password is incorrect’, ‘pass’,
‘password’, ‘user’, ‘root’) called at
/usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 1040
eval {…}(‘HTML::Mason::Component::FileBased=HASH(0xff90a8)’, ‘Error’,
‘Your username or password is incorrect’, ‘pass’, ‘password’, ‘user’,
‘root’) called at
/usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 1039
HTML::Mason::Request::comp(‘HTML::Mason::Request::ApacheHandler=HASH(0x8
63244)’, ‘HASH(0x1011ad4)’,
‘HTML::Mason::Component::FileBased=HASH(0xff90a8)’, ‘Error’, ‘Your
username or password is incorrect’, ‘pass’, ‘password’, ‘user’, ‘root’)
called at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm
line 336
eval {…}(‘HTML::Mason::Request::ApacheHandler=HASH(0x863244)’,
‘HASH(0x1011ad4)’, ‘HTML::Mason::Component::FileBased=HASH(0xff90a8)’,
‘Error’, ‘Your username or password is incorrect’, ‘pass’, ‘password’,
‘user’, ‘root’) called at
/usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 336
eval {…}(‘HTML::Mason::Request::ApacheHandler=HASH(0x863244)’,
‘HASH(0x1011ad4)’, ‘HTML::Mason::Component::FileBased=HASH(0xff90a8)’,
‘Error’, ‘Your username or password is incorrect’, ‘pass’, ‘password’,
‘user’, ‘root’) called at
/usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 296
HTML::Mason::Request::exec(‘HTML::Mason::Request::ApacheHandler=HASH(0x8
63244)’) called at
/usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/ApacheHandler.pm line
134
eval {…}(‘HTML::Mason::Request::ApacheHandler=HASH(0x863244)’) called
at /usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/ApacheHandler.pm
line 134
HTML::Mason::Request::ApacheHandler::exec(‘HTML::Mason::Request::ApacheH
andler=HASH(0x863244)’) called at
/usr/local/lib/perl5/site_perl/5.8.0/HTML/Mason/ApacheHandler.pm line
783
HTML::Mason::ApacheHandler::handle_request(‘HTML::Mason::ApacheHandler=H
ASH(0x2dd494)’, ‘Apache::RequestRec=SCALAR(0x45adc0)’) called at
/opt/rt3/bin/webmux.pl line 129
RT::Mason::handler(‘Apache::RequestRec=SCALAR(0x45adc0)’) called at -e
line 0
eval {…}(‘Apache::RequestRec=SCALAR(0x45adc0)’) called at -e line 0

Fixed by DBIx::SB-0.83_03 :wink:

I should catch up with my email before posting!

-BrookOn Saturday, May 31, 2003, at 04:37 PM, Brook Schofield wrote:

Jesse,
I received the error same sort of error as reported by Jamie. This
ONLY occurs when the ‘DESTROY’ method of SearchBuilder.pm is present.
Commenting it out gives the same behaviour as previous versions of RT.

I have observed this problem with RT3.0.2 and RT3.0.3pre1. I am
running RT under Mod_Perl 1.99_09 which could be a contributing factor
if Mod_Perl 1.27 users aren’t experiencing this.

Full error message below.

-Brook