Fix problem where setting a string that happened to contain the letters 'NULL' somewhere would fail
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@17024 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
40a65cc564
commit
d7c4c6e5f9
@ -1603,7 +1603,7 @@ sub setAttribs
|
||||
# delimit the columns of the table
|
||||
my $delimitedcol = &delimitcol($col);
|
||||
$cols = $cols . $delimitedcol . " = ?,";
|
||||
push @bind, (($$elems{$col} =~ /NULL/) ? undef: $$elems{$col});
|
||||
push @bind, (($$elems{$col} eq "NULL") ? undef: $$elems{$col});
|
||||
}
|
||||
chop($cols);
|
||||
my $cmd ;
|
||||
@ -1786,7 +1786,7 @@ sub setAttribsWhere
|
||||
# delimit the columns of the table
|
||||
my $delimitedcol = &delimitcol($col);
|
||||
$cols = $cols . $delimitedcol . " = ?,";
|
||||
push @bind, (($$elems{$col} =~ /NULL/) ? undef: $$elems{$col});
|
||||
push @bind, (($$elems{$col} eq "NULL") ? undef: $$elems{$col});
|
||||
}
|
||||
chop($cols);
|
||||
my $cmd = "UPDATE " . $self->{tabname} . " set $cols where " . $where_clause;
|
||||
|
Loading…
Reference in New Issue
Block a user