List:General Discussion« Previous MessageNext Message »
From:<sinisa Date:March 16 1999 12:23am
Subject:SELECT MAX() or SUM() always returns zero
View as plain text  
Jenny Lim writes:
 > Submitter-Id:  Jenny Lim
 > Originator:    Root
 > Organization:  Other Music, Inc.
 > MySQL support: email support
 > Synopsis:      SELECT MAX() or SUM() always returns Zero
 > Severity:      serious
 > Priority:      high
 > Category:      mysql
 > Class:         support
 > Release:       mysql-3.21.32a (Source distribution)
 > 
 > Environment:
 > 
 > System: Linux www.othermusic.com 2.0.34 #1 Fri Aug 28 19:39:04 PDT 1998
 > mips un\
 > known
 > Architecture: mips
 > 
 > Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
 > /usr/bin/c\
 > c
 > GCC: Reading specs from /usr/lib/gcc-lib/mipsel-linux/2.7.2/specs
 > 
 > Class:         support
 > Release:       mysql-3.21.32a (Source distribution)
 > 
 > Compilation info: CC='gcc'  CFLAGS='-O2'  CXX='gcc'  CXXFLAGS='-O2'
 > LDFLAGS='-\
 > static'
 > 
 > Perl: This is perl, version 5.004_04 built for mips-linux
 > 
 > Description:
 > I have a field CATALOG_ID in table OM_Catalog which is defined as
 > INT.  When I execute the statement "select MAX(CATALOG_ID) FROM
 > OM_Catalog", I always get zero even if I have records containing
 > catalog id's in the table..
 > 
 > +-----------------+
 > | max(catalog_id) |
 > +-----------------+
 > |               0 |
 > +-----------------+
 > 1 row in set (0.74 sec)
 > 
 > I have another DECIMAL(12,2) field
 > called total_price in table OM_Order_Header, when I execute
 > select SUM(total_price) FROM OM_Order_Header, it also always returns
 > zero even if there are orders in the table with prices in them.
 > 
 > +------------------+
 > | sum(total_price) |
 > +------------------+
 > |             0.00 |
 > +------------------+
 > 1 row in set (0.01 sec)
 > 
 > Please advise immediately...I have consulted all the
 > manuals/documentation already, and I've used SQL extensively...
 > I've never encountered such a problem before.
 > 
 > - Jenny
 > 
 > 

Hi!

Please check first of all whether FPU part of your mips is OK or
not. Particularly if it stopped running OK all at once.

If it never was working OK, then upgrade glibc libs.

Sinisa

+---------------------------------------------------------------------+
| TcX  ____  __     _____   _____  ___        ==  mysql@stripped        |
|     /*/\*\/\*\   /*/ \*\ /*/ \*\ |*|        Sinisa Milivojevic      |
|    /*/ /*/ /*/   \*\_   |*|   |*||*|        mailto:sinisa@stripped |
|   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*|        Belgrade                |
|  /*/     /*/  /*/\*\_/*/ \*\_/*/ |*|_____   Serbia                  |
|  ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^                           |
|             /*/             \*\                   Developers Team   |
+---------------------------------------------------------------------+
Thread
SELECT MAX() or SUM() always returns zeroJenny Lim15 Mar
  • SELECT MAX() or SUM() always returns zerosinisa16 Mar