From d7c4c6e5f9ee97307e248bc4b3093ac5c2177413 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Thu, 25 Jul 2013 15:14:21 +0000 Subject: [PATCH] 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 --- perl-xCAT/xCAT/Table.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index 549f6d637..34c73c189 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -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;