change get table handle not to create, problems in DB2

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5686 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
lissav 2010-04-06 14:52:10 +00:00
parent 4e138d4011
commit adfd551781

View File

@ -690,9 +690,9 @@ sub tabprune_all {
my $table = shift;
my $cb = shift;
my $rc=0;
my $tab = xCAT::Table->new($table, -create => 1, -autocommit => 0);
my $tab = xCAT::Table->new($table);
unless ($tab) {
$cb->({error => "Unable to open $table",errorcode=>4});
$cb->({error => "Unable to open the $table",errorcode=>4});
return 1;
}
$tab->delEntries(); #Yes, delete *all* entries
@ -706,7 +706,7 @@ sub tabprune_all {
# my $cb = shift;
# my $numberentries = shift;
# my $rc=0;
# #my $tab = xCAT::Table->new($table, -create => 1, -autocommit => 0);
# #my $tab = xCAT::Table->new($table);
# #unless ($tab) {
# # $cb->({error => "Unable to open $table",errorcode=>4});
# # return 1;
@ -724,7 +724,7 @@ sub tabprune_recid {
my $rc=0;
# check which database so can build the correct Where clause
my $DBname = xCAT::Utils->get_DBName;
my $tab = xCAT::Table->new($table, -create => 1, -autocommit => 0);
my $tab = xCAT::Table->new($table);
unless ($tab) {
$cb->({error => "Unable to open $table",errorcode=>4});
return 1;