Bug #19644 explain extended error
Submitted: 9 May 2006 17:26 Modified: 16 Jun 2006 22:55
Reporter: Andre Timmer Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.18 OS:
Assigned to: CPU Architecture:Any

[9 May 2006 17:26] Andre Timmer
Description:
"Explain extended" using unix mysql client results in a "Lost connection".
When using JDBC this also happens.

How to repeat:
MySQL client unix: 

---------------------------------------------
- explain extended fails
---------------------------------------------
mysql> explain extended
    -> select count(*)
    -> from   rawdata_organisaties_marktselect aa
    -> where  exists (
    ->               select ''
    ->               from   sleutel bb
    ->               where  aa.bkwi_lrrkvk_inschrijfnr_kvk  = bb.inschrijfnr_kvk
    ->               and    aa.bkwi_lrrkvk_volgnr_kvk       = bb.volgnr_kvk
    ->               and    aa.lrrorg != bb.lrrorg
    ->               );

ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
mysql>

---------------------------------------------
- standard explain works
---------------------------------------------
mysql> explain
    -> select count(*)
    -> from   rawdata_organisaties_marktselect aa
    -> where  exists (
    ->               select ''
    ->               from   sleutel bb
    ->               where  aa.bkwi_lrrkvk_inschrijfnr_kvk  = bb.inschrijfnr_kvk
    ->               and    aa.bkwi_lrrkvk_volgnr_kvk       = bb.volgnr_kvk
    ->               and    aa.lrrorg != bb.lrrorg
    ->               );
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    1
Current database: bbr

    +----+--------------------+-------+------+-----------------+-----------------+---------+------------------------------------------------------------------+--------+-------------+
| id | select_type        | table | type | possible_keys   | key             | key_len | ref                                                              | rows   | Extra       |
+----+--------------------+-------+------+-----------------+-----------------+---------+------------------------------------------------------------------+--------+-------------+
|  1 | PRIMARY            | aa    | ALL  | NULL            | NULL            | NULL    | NULL                                                             | 426601 | Using where |
|  2 | DEPENDENT SUBQUERY | bb    | ref  | ref_sleutel_uk1 | ref_sleutel_uk1 | 8       | bbr.aa.bkwi_lrrkvk_inschrijfnr_kvk,bbr.aa.bkwi_lrrkvk_volgnr_kvk |      1 | Using where |
+----+--------------------+-------+------+-----------------+-----------------+---------+------------------------------------------------------------------+--------+-------------+
2 rows in set (0.05 sec)

Suggested fix:
Fix.
[9 May 2006 18:49] MySQL Verification Team
Thank you for the bug report. I was unable to repeat on my own, could
you please provide a dump with insert data if needed. Thanks in advance.
[9 May 2006 19:32] Andre Timmer
Is only table structure with no data (too much), hope it is reproducable now.

Attachment: tab-dump.sql (application/octet-stream, text), 4.67 KiB.

[9 Jun 2006 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".
[10 Jun 2006 10:28] Andre Timmer
The last one priveded feedback was me. I'm waiting on you guys. Set status to Open again.
[16 Jun 2006 22:55] MySQL Verification Team
Thank you for the feedback. I was unable to repeat with the test case
provided and the current source server on Linux Suse 10:

mysql> select version();
+--------------+
| version()    |
+--------------+
| 5.0.23-debug | 
+--------------+
1 row in set (0.00 sec)

mysql> explain extended
    -> select count(*)
    -> from   rawdata_organisaties_marktselect aa
    -> where  exists (
    ->    select ''
    ->    from   sleutel bb
    ->    where  aa.bkwi_lrrkvk_inschrijfnr_kvk  =
    -> bb.inschrijfnr_kvk
    -> and    aa.bkwi_lrrkvk_volgnr_kvk       = bb.volgnr_kvk
    -> and    aa.lrrorg != bb.lrrorg
    -> )\G
*************************** 1. row ***************************
           id: 1
  select_type: PRIMARY
        table: NULL
         type: NULL
possible_keys: NULL
          key: NULL
      key_len: NULL
          ref: NULL
         rows: NULL
        Extra: Impossible WHERE noticed after reading const tables
*************************** 2. row ***************************
           id: 2
  select_type: DEPENDENT SUBQUERY
        table: NULL
         type: NULL
possible_keys: NULL
          key: NULL
      key_len: NULL
          ref: NULL
         rows: NULL
        Extra: no matching row in const table
2 rows in set, 4 warnings (0.00 sec)

mysql>