Error 1064 on selects from Information Schema if routine name has '\0'

Bug #1524507 reported by Sveta Smirnova
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.5
Triaged
Medium
Unassigned
5.6
Triaged
Medium
Unassigned
5.7
Triaged
Medium
Unassigned

Bug Description

Description:
When db in table mysql.proc contains symbol '\0' all selects from INFORMATION_SCHEMA.PARAMETERS fail with error "query 'SELECT * From information_schema.PARAMETERS' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`test' at line 1"

How to repeat:
create procedure p1() begin end;
SELECT * From information_schema.PARAMETERS;
update mysql.proc set db='test\0' where db='test';
SELECT * From information_schema.PARAMETERS;

I don't know how such database was created in customer's environment (maybe broken dump/restore), but having such invalid entries in mysql.proc table should not affect Information Schema anyway.

tags: added: upstream
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1679

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.