Bug #30891 stop of server process on running specific information_schema query
Submitted: 7 Sep 2007 11:26 Modified: 8 Dec 2016 14:33
Reporter: Sergei Tkachenko Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:5.1.21, 5.1.28 OS:Windows (XP SP2)
Assigned to: CPU Architecture:Any
Tags: regression, server process information_schema routines

[7 Sep 2007 11:26] Sergei Tkachenko
Description:
Sorry, don't have time for investigation of the problem & finding more general case. So briefly, server process reports about access violation & quits after trying to execute sql specific statement related to information_schema. The same statement worked in 5.1.19 without problems.

How to repeat:
SCENARIO:

Try to execute next statement from any client app. or driver lib (tried from MySQL QueryBuilder/SQLyog/libmysql):
SELECT ROUTINE_TYPE AS 'OBJECT_TYPE', ROUTINE_CATALOG as 'CATALOG', ROUTINE_SCHEMA as 'SCHEMA', ROUTINE_NAME as 'NAME' FROM information_schema.routines WHERE routine_schema = 'information_schema'

RESULT:
Server process reports about access violation & quits.

Suggested fix:
No one query should lead to aborting of server process.
[7 Sep 2007 13:01] Sveta Smirnova
Thank you for the report.

I can not repeat described behaviour.

Please provide accurate version of server you use, configuration file and error log. Also would be helpful if you can provide dump of the INFORMATION_SCHEMA.
[7 Sep 2007 19:13] Sergei Tkachenko
configuration (typical configuration was chosen during instalation & nothing changed after)

Attachment: my.ini (application/octet-stream, text), 9.03 KiB.

[7 Sep 2007 19:39] Sergei Tkachenko
Version: MySQL 5.1.21-beta-community

Other details on scenario: database along with metadata (information_schema) was created by previous version (5.1.19-beta-community), I only upgraded from 5.1.19 to 5.1.21, during installation I choosed configuration of new dbms instance & selected typical configuration. I didn't change data after upgrade.

Look for line in attached log:
070907 22:01:12  InnoDB: Started; log sequence number 0 402419
it's a moment of restart of dbms instance after crash.
[8 Sep 2007 0:57] Valeriy Kravchuk
Thank you for a problem report. Looks like we need more information on how to repeat as in my case there is no crash:

C:\Program Files\MySQL\MySQL Server 5.1\bin>mysql -uroot -proot test -P3310
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.1.21-beta-community-debug MySQL Community Server - Debug (GPL)

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

mysql> SELECT ROUTINE_TYPE AS 'OBJECT_TYPE', ROUTINE_CATALOG as 'CATALOG', ROUTI
NE_SCHEMA as
    -> 'SCHEMA', ROUTINE_NAME as 'NAME' FROM information_schema.routines WHERE r
outine_schema =
    -> 'information_schema';
Empty set (0.20 sec)
[27 Sep 2007 6:58] Sergei Tkachenko
Please try to execute statement against my schema data (provided in previous attached file).

This is what I have, when executing it:

c:\Program Files\MySQL\MySQL Server 5.1\bin>mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.21-beta-community MySQL Community Server (GPL)

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

mysql> SELECT 1 FROM information_schema.routines;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>

'Select' statement against other dynamic views (like partitions, triggers, views) seems to work ok.
[21 Nov 2007 12:57] Sergei Tkachenko
Execution of 'mysql_system_tables_fix.sql' against DBMS helped. But still server instance config wizard should help user to update metadata along with installation of binaries of new version. It could be a semi-automated update or at least some warning message.
[8 Dec 2016 14:33] Yngve Svendsen
Posted by developer:
 
The question of whether to automate mysql_upgrade runs is the root question here. That is under discussion. Meanwhile, I am closing this particular report now.