From fc986a252b43ec0bb0e61b0282ce5f65361633e1 Mon Sep 17 00:00:00 2001 From: linggao Date: Mon, 31 Aug 2009 19:52:33 +0000 Subject: [PATCH] removed the quotes for db columns that has the quotes after getting primary key info git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4064 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Table.pm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index 3c6ffbd4b..b3f7c9887 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -621,9 +621,11 @@ sub updateschema my $tn=$self->{tabname}; while ( my $col_info = $sth->fetchrow_hashref ) { #print Dumper($col_info); - push @columns, $col_info->{name}; + my $tmp_col=$col_info->{name}; + $tmp_col =~ s/"//g; + push @columns, $tmp_col; if ($col_info->{pk}) { - $dbkeys{$col_info->{name}}=1; + $dbkeys{$tmp_col}=1; } } $sth->finish; @@ -643,7 +645,9 @@ sub updateschema my $data = $sth->fetchall_arrayref; #print "data=". Dumper($data); foreach my $cd (@$data) { - $dbkeys{$cd->[3]}=1; + my $tmp_col=$cd->[3]; + $tmp_col =~ s/"//g; + $dbkeys{$tmp_col}=1; } }