From 52c1236f4e22c76ff1eaf3303d630200c179fe54 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 26 Jul 2013 19:17:10 +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/branches/2.8@17033 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;