Bug #20484 Partitions: crash with explain and union
Submitted: 15 Jun 2006 19:25 Modified: 3 Aug 2006 2:21
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Partitions Severity:S1 (Critical)
Version:5.1.12-beta-debug-log OS:Linux (Linux, SUSE 10.0 / 64-bit)
Assigned to: Sergey Petrunya CPU Architecture:Any

[15 Jun 2006 19:25] Peter Gulutzan
Description:
I create any table. It doesn't matter whether it's partitioned or not.
I say EXPLAIN PARTITIONS SELECT ... UNION ALL SELECT ...
Crash.

How to repeat:
mysql> create table t (s1 int);
Query OK, 0 rows affected (0.00 sec)

mysql> explain partitions select 1 from t union all select 2;
ERROR 2013 (HY000): Lost connection to MySQL server during query
[15 Jun 2006 20:41] Valeriy Kravchuk
Verified just as described with 5.1.12-BK (ChangeSet@1.2179, 2006-06-15 16:24:02+05:00) on Linux:

openxs@suse:~/dbs/5.1> bin/mysql -uroot test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 5.1.12-beta-debug

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> drop table t;
Query OK, 0 rows affected (0.01 sec)

mysql> create table t (s1 int);
Query OK, 0 rows affected (0.02 sec)

mysql> explain partitions select 1 from t union all select 2;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
Number of processes running now: 0
060615 19:23:27  mysqld restarted

I think it is S1 bug, as we have a server crash.
[30 Jun 2006 5:23] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/8534
[18 Jul 2006 23:39] Sergey Petrunya
Notes for the changelog: 
EXPLAIN PARTITIONS crashed on a query with UNION (no matter whether the query used partitioned tables or not). Now this has been fixed.
[2 Aug 2006 19:13] Evgeny Potemkin
Fixed in 5.1.12
[3 Aug 2006 2:21] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://www.mysql.com/doc/en/Installing_source_tree.html

Documented bugfix in 5.1.12 changelog.