From 21c20c60689630ad97466fe5cf78e9b55a4d59f9 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 3 Mar 2008 21:00:13 +0000 Subject: [PATCH] nodels and nodech now report errors on any unrecognizable table.column specifications git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@653 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/tabutils.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xCAT-server-2.0/lib/xcat/plugins/tabutils.pm b/xCAT-server-2.0/lib/xcat/plugins/tabutils.pm index 8d86fa5ca..b9eddf7bc 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/tabutils.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/tabutils.pm @@ -593,6 +593,10 @@ sub nodech { ($table, $column) = split('\.', $temp, 2); } + unless (grep /$column/,@{$xCAT::Schema::tabspec{$table}->{cols}}) { + $callback->({error=>"$table.$column not a valid table.column description",errorcode=>[1]}); + return; + } $tables{$table}->{$column} = [$value, $op]; } foreach $tab (keys %tables) @@ -795,6 +799,10 @@ sub nodels { ($table, $column) = split('\.', $temp, 2); } + unless (grep /$column/,@{$xCAT::Schema::tabspec{$table}->{cols}}) { + $callback->({error=>"$table.$column not a valid table.column description",errorcode=>[1]}); + next; + } unless (grep /^$column$/, @{$tables{$table}}) { push @{$tables{$table}},