From a00247706bc888169161b5b714444e5d3e5d36a7 Mon Sep 17 00:00:00 2001 From: lissav Date: Tue, 11 Jan 2011 19:31:27 +0000 Subject: [PATCH] start to merge the disable attribute checkin git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8617 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Table.pm | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index 7b4bc69bc..1ca5b598c 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -2616,18 +2616,9 @@ sub getAllEntries . " WHERE " . q(`disable`) . " is NULL or " . q(`disable`) . " in ('0','no','NO','No','nO')"); } else { - if ($xcatcfg =~ /^DB2:/) { #for DB2 - my $qstring = - "SELECT * FROM " - . $self->{tabname} - . " WHERE \"disable\" is NULL OR \"disable\" LIKE '0' OR \"disable\" LIKE 'no' OR \"disable\" LIKE 'NO' OR \"disable\" LIKE 'nO' "; - $query = $self->{dbh}->prepare($qstring); - - } else { # for other dbs $query = $self->{dbh}->prepare('SELECT * FROM ' . $self->{tabname} . " WHERE \"disable\" is NULL or \"disable\" in ('','0','no','NO','No','nO')"); - } } } @@ -3220,11 +3211,7 @@ sub getAttribs if ($xcatcfg =~ /^mysql:/) { #for mysql $statement .= "(" . q(`disable`) . " is NULL or " . q(`disable`) . " in ('0','no','NO','No','nO'))"; } else { - if ($xcatcfg =~ /^DB2:/) { #for DB2 - $statement .= "(\"disable\" is NULL OR \"disable\" LIKE '0' OR \"disable\" LIKE 'no' OR \"disable\" LIKE 'NO' OR \"disable\" LIKE 'No' OR \"disable\" LIKE 'nO')"; - } else { # for other dbs $statement .= "(\"disable\" is NULL or \"disable\" in ('0','no','NO','No','nO'))"; - } } #print "This is my statement: $statement \n"; my $query = $self->{dbh}->prepare($statement);