Bug #4605 Views: View based on a function crashes after function is dropped
Submitted: 18 Jul 2004 22:51 Modified: 19 Jul 2004 19:20
Reporter: Trudy Pelzer Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.1-alpha-debug OS:Linux (SuSE 8.2)
Assigned to: CPU Architecture:Any

[18 Jul 2004 22:51] Trudy Pelzer
Description:
If one creates a view (e.g. v6) based on a function (e.g. f6), then drops the function, a subsequent SELECT from the view crashes the MySQL server with this error:
ERROR 2013 (HY000): Lost connection to MySQL server during query

This may be related to Bug#4606.

How to repeat:
delimiter //
create function f6 () returns int return 6;//
create view v6 as select f6()//
drop function f6//
select * from v6//
[19 Jul 2004 19:20] Aleksey Kishkin
Can't repeat

mysql> create function f6 () returns int return 6;//
Query OK, 0 rows affected (0.00 sec)

mysql> create view v6 as select f6()//
Query OK, 0 rows affected (0.00 sec)

mysql> drop function f6//
Query OK, 0 rows affected (0.00 sec)

mysql> select * from v6//
ERROR 1303 (42000): FUNCTION test.f6 does not exist