#39470 [NEW]: can't query
| From: | roderja at hotmail dot com | Date: | Sat, 11 Nov 2006 13:09:52 +0000 |
| Subject: | #39470 [NEW]: can't query | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-104820@lists.php.net to get a copy of this message | ||
From: roderja at hotmail dot com
Operating system: windows xp sp2
PHP version: 5.2.0
PHP Bug Type: MySQLi related
Bug description: can't query
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
--
Edit bug report at http://bugs.php.net/?id=39470&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39470&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39470&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39470&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39470&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=39470&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=39470&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=39470&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=39470&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=39470&r=support
Expected behavior: http://bugs.php.net/fix.php?id=39470&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=39470&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=39470&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39470&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39470&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39470&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=39470&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=39470&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=39470&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=39470&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=39470&r=mysqlcfg