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
This commit is contained in:
lissav 2008-09-26 12:32:23 +00:00
parent 75cf783bb3
commit 5a590d9762

View File

@ -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);