From 0cb7ef99f2960a6ba76353dff28d18e1d144b710 Mon Sep 17 00:00:00 2001 From: daniceexi Date: Wed, 13 Jan 2010 03:21:50 +0000 Subject: [PATCH] getobjdefs: only the node type has the special case for performance enhance git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4943 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/DBobjUtils.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/perl-xCAT/xCAT/DBobjUtils.pm b/perl-xCAT/xCAT/DBobjUtils.pm index 04f8c6f86..692f5443d 100644 --- a/perl-xCAT/xCAT/DBobjUtils.pm +++ b/perl-xCAT/xCAT/DBobjUtils.pm @@ -407,11 +407,13 @@ sub getobjdefs { next; } - # skip the attributes that does not needed - if (scalar(@attrs) > 0 && !grep(/^$attr$/, @attrs)) { - next; - } - + # skip the attributes that does not needed for node type + if ($getnodes) { + if (scalar(@attrs) > 0 && !grep(/^$attr$/, @attrs)) { + next; + } + } + # OK - get the info needed to access the DB table # - i.e. table name, key name, attr names