mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-03 21:02:34 +00:00 
			
		
		
		
	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:
		@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user