Bug #18177 any access to INFORMATION_SCHEMA.ROUTINES crashes
| Submitted: | 13 Mar 2006 2:29 | Modified: | 13 May 2006 4:33 |
|---|---|---|---|
| Reporter: | Ross Vandegrift | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Information schema | Severity: | S1 (Critical) |
| Version: | 5.0.18, 5.0.19, 5.0.21-BK | OS: | Linux (Linux) |
| Assigned to: | Sergei Glukhov | CPU Architecture: | Any |
[13 Mar 2006 2:29]
Ross Vandegrift
[13 Mar 2006 14:27]
Valeriy Kravchuk
Thank you for a problem report. Can you send or upload a dump of your (or, even better, the smallest one) mysql database (or ROUTINES table at least) that demonstrate the behaviour you described?
[13 Mar 2006 23:10]
Ross Vandegrift
I have narrowed the issue down to a particular procedure. The problem appears to be that a procedure was somehow created named ''. I'll attach a dump of mysql.proc that includes just this single stored procedure. Deleting this entry from mysql.proc corrects the crash issue and allows normal use of stored procedures. Unfortunately, I don't have an explanation as to how this was created, especially by a user without SUPER privileges.
[13 Mar 2006 23:11]
Ross Vandegrift
This dump creates a stored procedure named '', and causes the indicated crashes
Attachment: suspect.sql (text/x-sql), 3.11 KiB.
[22 Apr 2006 15:32]
Valeriy Kravchuk
Verified with 5.0.21-BK (ChangeSet@1.2097, 2006-04-21 20:24:52+02:00) on Linux:
openxs@suse:~/dbs/5.0> bin/mysql -uroot test
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 6 to server version: 5.0.21
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> INSERT INTO `proc` VALUES ('test','','PROCEDURE','','SQL','CONTAINS_SQL'
,'NO','DEFINER','','','BEGIN\r\n \r\nEND','root@%','2006-03-02 18:40:03','2006
-03-02 18:40:03','','');
Query OK, 1 row affected (0.01 sec)
mysql> select * from information_schema.routines;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
Number of processes running now: 0
060422 16:28:31 mysqld restarted
So, test case (to be run as root) is simple:
INSERT INTO `mysql`.`proc` VALUES ('test', '', 'PROCEDURE', '', 'SQL', 'CONTAINS_SQL', 'NO', 'DEFINER', '', '', 'BEGIN\r\n \r\nEND', 'root@%', '2006-03-02 18:40:03', '2006-03-02 18:40:03', '', '');
select * from information_schema.routines;
Even if this action is incorrect, but only valid SQL statements were used and it should not lead to server's crash!
[25 Apr 2006 9:58]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/5461
[25 Apr 2006 10:34]
Alexander Barkov
The patch looks ok to push.
[4 May 2006 9:40]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/5936
[12 May 2006 12:39]
Sergei Glukhov
Fixed in 5.0.22
[12 May 2006 14:49]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/6304
[13 May 2006 4:33]
Paul DuBois
Noted in 5.0.22 changelog. An entry in the <literal>mysql.proc</literal> table with an empty routine name caused access to the <literal>INFORMATION_SCHEMA.ROUTINES</literal> table to crash the server.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.044 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.