Bug #94519 Wrong messages in error-log when using partition with lower-case-table-names=1
Submitted: 1 Mar 8:45 Modified: 1 Mar 8:53
Reporter: tsubasa tanaka (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Logging Severity:S3 (Non-critical)
Version:8.0.14, 8.0.15 OS:CentOS (7.6)
Assigned to: CPU Architecture:x86
Tags: Invalid (old?) table or database name, MY-010520, regression

[1 Mar 8:45] tsubasa tanaka
Description:
Wrong error message "[MY-010520] [Server] Invalid (old?) table or database name '..'" is described when "CREATE TABLE .. PARTITION BY .." with "--lower-case-table-names=1".

I seem the table works correctly (can INSERT, UPDATE and SELECT).
Maybe mysqld's error-logging is incorrect.

This occurs MySQL 8.0.14 and later.
MySQL 8.0.13 is not described this message.

How to repeat:
### Install latest mysql-community-server freshly.
$ yum install -y https://dev.mysql.com/get/mysql80-community-release-el7-2.noarch.rpm
$ yum install -y mysql-community-server

### Set lower-case-table-names=1 into my.cnf
$ vim /etc/my.cnf
lower-case-table-names= 1

### initialize and start mysqld via systemd
$ systemctl start mysqld

### Create a table with partitioning. 
### This doesn't raise any error.
$ mysql -p

mysql> CREATE DATABASE d1;
mysql> use d1
mysql> CREATE TABLE t1 (num int PRIMARY KEY) PARTITION BY HASH(num) PARTITIONS 1;
Query OK, 0 rows affected (0.02 sec)

### But error-log describes MY-010520 error.
$ less /var/log/mysqld.log
..
2019-03-01T08:28:18.877166Z 8 [ERROR] [MY-010520] [Server] Invalid (old?) table or database name 't1#p#p0'
2019-03-01T08:28:18.878591Z 8 [ERROR] [MY-010520] [Server] Invalid (old?) table or database name 't1#p#p0'
2019-03-01T08:28:18.883393Z 8 [ERROR] [MY-010520] [Server] Invalid (old?) table or database name 't1#p#p0'
2019-03-01T08:28:18.884951Z 8 [ERROR] [MY-010520] [Server] Invalid (old?) table or database name 't1#p#p0'

Suggested fix:
Stop wrong messages in error-log.
[1 Mar 8:53] Umesh Shastry
Hello Tanaka-San,

Thank you for the report.

regards,
Umesh