From 2aa7ab36dcfca7059368d357f5bbec25c7a1c327 Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 15 Jan 2009 17:47:54 +0000 Subject: [PATCH] more fixes to support mysql, chtab key=test site -d gives error git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2615 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Table.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index 974f877f5..c053ed5b1 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -1582,7 +1582,8 @@ sub delEntries my @qargs = (); foreach (keys %keypairs) { - $qstring .= "$_ = ? AND "; + $qstring .= "\"$_\" = ? AND "; #mysql change + #$qstring .= "$_ = ? AND "; push @qargs, $keypairs{$_}; } $qstring =~ s/ AND \z//; @@ -1605,7 +1606,8 @@ sub delEntries if ($keyref) { $delstring .= ' WHERE '; } foreach (keys %keypairs) { - $delstring .= $_ . ' = ? AND '; + #$delstring .= $_ . ' = ? AND '; + $delstring .= "\"$_\"" . ' = ? AND '; #mysql change if (ref($keypairs{$_})) { #XML transformed data may come in mangled unreasonably into listrefs push @stargs, $keypairs{$_}->[0];