Bug #7211 information_schema: crash if bad view
Submitted: 13 Dec 2004 1:08 Modified: 16 Dec 2004 12:46
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: Sergei Glukhov CPU Architecture:Any

[13 Dec 2004 1:08] Peter Gulutzan
Description:
I have a database which has a bad view. 
The view is bad because of a different bug, 
#7015: Views: selection fails if sum(distinct), 
which is clearly not an information_schema problem. 
But I worry that the new information_schema code is 
not recovering well when errors exist in the metadata. 
If I "select * from information_schema.views" twice, 
the mysqld server warns: 
"Warning: prev link 1 didn't point at previous lock 
at read: read lock with no write locks" 
and the failure is severe, I must say "kill -9". 
 

How to repeat:
mysql> create table t (s1 int); 
Query OK, 0 rows affected (0.00 sec) 
 
mysql> create view v as select sum(distinct s1) fromt; 
Query OK, 0 rows affected (0.00 sec) 
 
mysql> select * from information_schema.views; 
ERROR 1305 (42000): FUNCTION db5.sum_distinct does not exist 
mysql> select * from information_schema.views;
[16 Dec 2004 12:46] Sergei Glukhov
Fixed in 5.0 source tree