From 5a590d976275774627ae7f6e8e3047764453593f Mon Sep 17 00:00:00 2001 From: lissav Date: Fri, 26 Sep 2008 12:32:23 +0000 Subject: [PATCH] fix handling of tables that have a reserved word as an attribute ( non- key attribute) as in the prodkey table git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2233 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Table.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index 3c7d6814d..0e28e39e3 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -107,7 +107,7 @@ sub buildcreatestmt if (isAKey(\@{$descr->{keys}},$col)) { # keys need defined length $retv .= "\"$col\" VARCHAR(128)"; } else { - $retv .= "$col TEXT"; + $retv .= "\"$col\" TEXT"; } if (grep /^$col$/, @{$descr->{required}}) { @@ -650,6 +650,7 @@ sub setAttribs #push @qargs, $keypairs{$_}; $qstring .= "\"$_\" = ? AND "; push @qargs, $keypairs{$_}; + } $qstring =~ s/ AND \z//; my $query = $self->{dbh}->prepare($qstring);