php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39470 can't query
Submitted: 2006-11-11 13:09 UTC Modified: 2006-11-11 13:22 UTC
From: roderja at hotmail dot com Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 5.2.0 OS: windows xp sp2
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: roderja at hotmail dot com
New email:
PHP Version: OS:

 

 [2006-11-11 13:09 UTC] roderja at hotmail dot com
Description:
------------
Hi
I have 60 tables from cls1 to cls60 and another 60 tables from subcls1 to subcls60.
When I join cls1 with subcls1 tables(from cls1 to cls20 and subcls1 to subcls20) and union these 40 tables toghther. It's work.
In the same condition, when I try to join and union 120 tables(three times as previous case) together, it can't work.
At that moment, I use strlen() try to figure out the length of the query string, the len is 33817.
Doesn't is a bug or does there have any system paramater that I need to change?
I appreciated.

Reproduce code:
---------------
select StsID, count(*) from (  
SELECT *  FROM  (  SELECT cls.ID, cls.IIGrpID, cls.IIID , subcls.*  FROM cls1 AS cls  LEFT JOIN (  SELECT AIID, ID, StsID, CIGrpID, CIID, RIGrpID, RIID  FROM subcls1 as subcls  ORDER BY StsID  ) AS subcls ON cls.ID = subcls.AIID  GROUP BY cls.ID  ) whole  LEFT JOIN  ( SELECT count( * ) AS num FROM subcls1 as subcls  GROUP BY AIID  ) AS subsum  ON whole.ID = subsum.AIID
UNION ??
UNION
SELECT *  FROM  (  SELECT cls.ID, cls.IIGrpID, cls.IIID , subcls.*  FROM cls60 AS cls  LEFT JOIN (  SELECT AIID, ID, StsID, CIGrpID, CIID, RIGrpID, RIID  FROM subcls60 as subcls  ORDER BY StsID  ) AS subcls ON cls.ID = subcls.AIID  GROUP BY cls.ID  ) whole  LEFT JOIN  ( SELECT count( * ) AS num FROM subcls60 as subcls  GROUP BY AIID  ) AS subsum  ON whole.ID = subsum.AIID
) as whole  group by StsID


Expected result:
----------------
I can got each status total number from the result.

Actual result:
--------------
StsID count(*)
1     6800
2     2600
3     4600
4     6200
5     3800

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-11 13:22 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 09:01:29 2024 UTC