php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32208 WHERE column > -1 crashes but WHERE column < -1 or WHERE column = 1 are fine
Submitted: 2005-03-06 22:32 UTC Modified: 2005-03-20 18:01 UTC
From: wolstena at sfu dot ca Assigned:
Status: No Feedback Package: MySQL related
PHP Version: 4.3.10 OS: Fedora Core 3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: wolstena at sfu dot ca
New email:
PHP Version: OS:

 

 [2005-03-06 22:32 UTC] wolstena at sfu dot ca
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
 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-07 00:39 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

And if it still is crashing, provide the GDB backtrace.

 [2005-03-20 18:01 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Nov 28 20:03:17 2021 UTC