update delEntries routine with delimitcols
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8614 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
4f575e78a9
commit
238834c1a3
@ -2998,7 +2998,6 @@ sub getAllAttribs
|
||||
sub delEntries
|
||||
{
|
||||
my $self = shift;
|
||||
my $xcatcfg =get_xcatcfg();
|
||||
if ($dbworkerpid) {
|
||||
return dbc_call($self,'delEntries',@_);
|
||||
}
|
||||
@ -3033,15 +3032,9 @@ sub delEntries
|
||||
$qstring .= "(";
|
||||
foreach my $keypair (keys %{$keypairs})
|
||||
{
|
||||
if ($xcatcfg =~ /^mysql:/) {
|
||||
$qstring .= q(`) . $keypair . q(`) . " = ? AND ";
|
||||
} else {
|
||||
if (($xcatcfg =~ /^DB2:/) || ($xcatcfg =~ /^Pg:/)) {
|
||||
$qstring .= q(") . $keypair . q(") . " = ? AND ";
|
||||
} else { # for other dbs
|
||||
$qstring .= "$keypair = ? AND ";
|
||||
}
|
||||
}
|
||||
# delimit the columns of the table
|
||||
my $dkeypair= &delimitcol($keypair);
|
||||
$qstring .= "$dkeypair = ? AND ";
|
||||
|
||||
push @qargs, $keypairs->{$keypair};
|
||||
}
|
||||
@ -3073,15 +3066,8 @@ sub delEntries
|
||||
$delstring .= "(";
|
||||
foreach my $keypair (keys %{$keypairs})
|
||||
{
|
||||
if ($xcatcfg =~ /^mysql:/) {
|
||||
$delstring .= q(`) . $keypair. q(`) . ' = ? AND ';
|
||||
} else {
|
||||
if (($xcatcfg =~ /^DB2:/) || ($xcatcfg =~ /^Pg:/)) {
|
||||
$delstring .= q(") . $keypair. q(") . ' = ? AND ';
|
||||
} else { # for other dbs
|
||||
$delstring .= $keypair . ' = ? AND ';
|
||||
}
|
||||
}
|
||||
my $dkeypair= &delimitcol($keypair);
|
||||
$delstring .= $dkeypair . ' = ? AND ';
|
||||
if (ref($keypairs->{$keypair}))
|
||||
{ #XML transformed data may come in mangled unreasonably into listrefs
|
||||
push @stargs, $keypairs->{$keypair}->[0];
|
||||
|
Loading…
Reference in New Issue
Block a user