Bug #11292 SQL doesn't work with many UNION ALLs
Submitted: 13 Jun 2005 16:45 Modified: 15 Jul 2005 13:14
Reporter: [ name withheld ] Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.0 OS:HP/UX (HP-UX 11.11)
Assigned to: CPU Architecture:Any

[13 Jun 2005 16:45] [ name withheld ]
Description:
I have an SQL that uses 16 UNION ALLs and it's failing with the following exception. It fails only on HP-UX and works in all other platforms (Linux, Solaris, AIX).

How to repeat:
create a TEST_TABLE and load some test data and run the following SQL:

select count(*) from TEST_TABLE
UNION ALL
select count(*) from TEST_TABLE
UNION ALL
select count(*) from TEST_TABLE
UNION ALL
select count(*) from TEST_TABLE
UNION ALL
select count(*) from TEST_TABLE
UNION ALL
select count(*) from TEST_TABLE
UNION ALL
select count(*) from TEST_TABLE
UNION ALL
select count(*) from TEST_TABLE
UNION ALL
select count(*) from TEST_TABLE
UNION ALL
select count(*) from TEST_TABLE
UNION ALL
select count(*) from TEST_TABLE
UNION ALL
select count(*) from TEST_TABLE
UNION ALL
select count(*) from TEST_TABLE
UNION ALL
select count(*) from TEST_TABLE
UNION ALL
select count(*) from TEST_TABLE
UNION ALL
select count(*) from TEST_TABLE
UNION ALL
select count(*) from TEST_TABLE
[13 Jun 2005 17:06] MySQL Verification Team
What exception do you get, which 4.0 is it exactly, which HP-UX, which CPU and is binary 32 or 64 bit, and finally is it our binary ??
[13 Jun 2005 17:11] [ name withheld ]
Here is information requested:

Exception:
SQL State:  08S01
Error Code: 0
Message:    Communication link failure: java.io.IOException
java.sql.SQLException: Communication link failure: java.io.IOException
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1626)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:886)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:953)
        at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:925)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:1868)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:1802)
        at com.mysql.jdbc.Statement.execute(Statement.java:888)

OS:
 System: HP-UX lepton B.11.11 U 9000/800 1279364181 unlimited-user license

DB:
<DatabaseMetaData>
Product Name:         MySQL
Product Version:      4.0.18-pro-log
Default Trans:        2
Driver Name:          MySQL-AB JDBC Driver
Driver Version:       3.0.8-stable ( $Date: 2003/05/19 00:57:19 $, $Revision: 1.27.2.18 $ )
Driver Major Version: 3
Driver Minor Version: 0
</DatabaseMetaData>

Binary is from MySQL.
[13 Jun 2005 17:16] MySQL Verification Team
Can you please try that command from mysql command line program and see if it fails too. Looks like it should, but please check.

Also, please try with 4.0.24 ... May be it is some already fixed bug.

Is mysqld you are using 32 or 64 bit and same question for CPU on HP-UX. Is it PA RISC 1.1 or 2.2 ??
[14 Jun 2005 18:21] [ name withheld ]
MySQL is 32-bit and HP-UX is 64 bit
[15 Jun 2005 13:14] MySQL Verification Team
First , try with 4.0.24
Second, try with 64-bit binary
That should fix it
[15 Jul 2005 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".