Bug #86264 [ERROR] Invalid (old?) table or database name '-2'
Submitted: 10 May 2017 8:16 Modified: 10 May 2017 10:32
Reporter: Roel Van de Paar Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: DML Severity:S1 (Critical)
Version:5.7.17 OS:Any
Assigned to: CPU Architecture:Any

[10 May 2017 8:16] Roel Van de Paar
Description:
CLI:
mysql> create database `#mysql50#-2`;
Query OK, 1 row affected (0.00 sec)

Error log:
2017-05-10T07:51:35.958021Z 3 [ERROR] Invalid (old?) table or database name '-2'

This could potentially be a security issue (injection). I would recommend marking it as such until proven otherwise.

How to repeat:
create database `#mysql50#-2`;
SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS;
[10 May 2017 10:32] MySQL Verification Team
Hello Roel,

Thank you for the report and test case.
This sounds like duplicate of your earlier reported Bug #73920

Thanks,
Umesh