Bug #8411 Stored procedure crash if function contains view reference

Submitted: 9 Feb 2005 23:13 Modified: 21 Apr 2005 14:12
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.3-alpha-debug OS:Linux (SUSE 9.2)
Assigned to: Per-Erik Martin CPU Architecture:Any

[9 Feb 2005 23:13] Peter Gulutzan
Description:
If I use a function which refers to a view in an UPDATE statement, I get a crash.
This appears to be slightly different from bug#8405, because the ultimate reference
in the function is to a table which is different from the view which I am updating.

How to repeat:
mysql> create table t50 (s1 int, s2 int);//
Query OK, 0 rows affected (0.10 sec)

mysql> create view v50 as select * from t50//
Query OK, 0 rows affected (0.01 sec)

mysql> insert into v50 values (1,2)//
Query OK, 1 row affected (0.00 sec)

mysql> create function v50 () returns int return (select s1 from v50 limit 1)//
Query OK, 0 rows affected (0.00 sec)

mysql> create table t51a (s1 int, s2 int)//
Query OK, 0 rows affected (0.10 sec)

mysql> insert into t51a values (1,2)//
Query OK, 1 row affected (0.10 sec)

mysql> update t51a set s1 = v50()//
ERROR 2013 (HY000): Lost connection to MySQL server during query
[10 Feb 2005 0:57] Jorge del Conde
Thanks for the bug report PeterG.  I reproduced this behaviour using 5.0.3 from our latest bk tree.
[21 Apr 2005 14:12] Per-Erik Martin
No longer repeatable.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.051 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.