From:             wolstena at sfu dot ca
Operating system: Fedora Core 3
PHP version:      4.3.10
PHP Bug Type:     MySQL related
Bug description:  WHERE column > -1  crashes but WHERE column < -1 or WHERE 
column = 1 are fine

Description:
------------
The query below causes mysql_query() to crash without 
php without error. The original query:

SELECT b189_start, b189_end, product_level1.Id AS id, 
product_level1.a001 AS a001, b014 AS description, 
FORMAT(price.j151, 2) AS price, images.Name AS 
product_image, CONCAT_WS(': ', b028, b029) AS title
FROM product_level1 
LEFT JOIN product_webcategory_x ON 
(product_level1.ID=product_webcategory_x.ID_product) 
LEFT JOIN codes ON 
(product_webcategory_x.ID_category=codes.ID) 
LEFT JOIN price ON (product_level1.a001=price.a001) 
LEFT JOIN images ON (product_level1.a001 = 
images.ProductID) 
WHERE ( b189_start >= -1 AND b189_start <= 3) AND 
(b189_end <= 3 ) AND ( price.j151 > 0 ) AND (price.j151 
IS NOT NULL) AND ( xWebInactive < 1 ) 
GROUP BY product_level1.ID 
ORDER BY b028, b029

I have tracked the probelm down to the WHERE condition 
with ">" and negative numbers. For example, if I change

"b189_start >= -1" to "b189_start = -1" or "b189_start < 
-1" The problem crash does not occur. 

Mysql info:
mysql-shared-compat-3.23.58-9.1
php-mysql-4.3.10-3.2
mysql-client-4.1.9-0RH_FC
mysql-devel-3.23.58-14
mysql-server-4.1.9-0RH_FC
 


-- 
Edit bug report at http://bugs.php.net/?id=32208&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=32208&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=32208&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=32208&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=32208&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=32208&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=32208&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=32208&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=32208&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=32208&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=32208&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=32208&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=32208&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=32208&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=32208&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=32208&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=32208&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=32208&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=32208&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=32208&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=32208&r=mysqlcfg

Reply via email to