Bug #9930 EXPLAIN for SELECT on view
Submitted: 15 Apr 2005 13:53 Modified: 11 May 2005 16:23
Reporter: Ulf Wendel Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S3 (Non-critical)
Version:5.0.3-beta-debug OS:Linux (Linux linux 2.6.8-24.14-smp #1 S)
Assigned to: Igor Babaev CPU Architecture:Any

[15 Apr 2005 13:53] Ulf Wendel
Description:
EXPLAIN SELECT * FROM custom_hotel makes the server crash. custom_hotel is a view. Schema is attached.

mysql> \! uname -a
Linux linux 2.6.8-24.14-smp #1 SMP Tue Mar 29 09:27:43 UTC 2005 i686 i686 i386 GNU/Linux

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

mysql> show create view custom_hotel;
+--------------+----------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------
---------+
| View         | Create View

         |
+--------------+----------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------
---------+
| custom_hotel | CREATE ALGORITHM=UNDEFINED VIEW `hotel`.`custom_hotel` AS select `customer_addr`.`name` AS `customname`,`customer_addr`.`ci
ty` AS `customcity`,`hotel_addr`.`name` AS `hotelname`,`hotel_addr`.`city` AS `hotelcity` from `hotel`.`customer_addr` join `hotel`.`hotel_a
ddr` join `hotel`.`reservation` where ((`customer_addr`.`cno` = `hotel`.`reservation`.`cno`) and (`hotel_addr`.`hno` = `hotel`.`reservation`
.`hno`)) |
+--------------+----------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------
---------+
1 row in set (0.00 sec)

mysql> explain select * from custom_hotel;
ERROR 2013 (HY000): Lost connection to MySQL server during query

How to repeat:
See above.
[15 Apr 2005 13:54] Ulf Wendel
mysqldump of the schema (including data)

Attachment: hotel.sql (application/octet-stream, text), 13.04 KiB.

[15 Apr 2005 17:05] Jorge del Conde
jorge-/home/jorge> mysql -uroot --force hotel < hotel.sql
jorge-/home/jorge> mysql -uroot hotel
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 5 to server version: 5.0.4-beta

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

mysql> explain select * from custom_hotel;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql> 
Number of processes running now: 1
kill: usage: kill [-s sigspec | -n signum | -sigspec] [pid | job]... or kill -l [sigspec]
050415 12:33:06  mysqld restarted
[11 May 2005 16:23] Igor Babaev
Thank you for taking the time to report a problem.  Unfortunately
you are not using a current version of the product your reported a
problem with -- the problem might already be fixed. Please download
a new version from http://www.mysql.com/downloads/

If you are able to reproduce the bug with one of the latest versions,
please change the version on this bug report to the version you
tested and change the status back to "Open".  Again, thank you for
your continued support of MySQL.