From 9d31ce3f41d07c714a3f5a042b208c2df4be254b Mon Sep 17 00:00:00 2001 From: lissav Date: Tue, 11 Jan 2011 18:56:49 +0000 Subject: [PATCH] update getAttribs with delimitcol git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8615 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Table.pm | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index 1df5f3753..7b4bc69bc 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -3199,17 +3199,10 @@ sub getAttribs my @exeargs; foreach (keys %keypairs) { + my $dkeypair= &delimitcol($_); if ($keypairs{$_}) { - if ($xcatcfg =~ /^mysql:/) { #for mysql - $statement .= q(`) . $_ . q(`) . " = ? and " - } else { - if (($xcatcfg =~ /^DB2:/) || ($xcatcfg =~ /^Pg:/)) { - $statement .= q(") . $_ . q(") . " = ? and " - } else { # for other dbs - $statement .= "$_ = ? and "; - } - } + $statement .= $dkeypair . " = ? and "; if (ref($keypairs{$_})) { #correct for XML process mangling if occurred push @exeargs, $keypairs{$_}->[0]; @@ -3221,15 +3214,7 @@ sub getAttribs } else { - if ($xcatcfg =~ /^mysql:/) { #for mysql - $statement .= q(`) . $_ . q(`) . " is NULL and " ; - } else { - if (($xcatcfg =~ /^DB2:/) || ($xcatcfg =~ /^Pg:/)) { - $statement .= q(") . $_ . q(") . " is NULL and " ; - } else { # for other dbs - $statement .= "$_ is NULL and "; - } - } + $statement .= $dkeypair . " is NULL and " ; } } if ($xcatcfg =~ /^mysql:/) { #for mysql