Bug #94519 Wrong messages in error-log when using partition with lower-case-table-names=1
Submitted: 1 Mar 2019 8:45 Modified: 8 Jul 2019 19:33
Reporter: Tsubasa Tanaka (OCA) Email Updates:
Status: Closed 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 2019 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 2019 8:53] MySQL Verification Team
Hello Tanaka-San,

Thank you for the report.

regards,
Umesh
[29 Apr 2019 6:07] QUAN ZHANG
Pls  fix it in error log. the file used large space.
[6 Jun 2019 12:57] Erlend Dahl
Bug#95576 MySQL 8.0.16 partition table report error log

was marked as a duplicate
[8 Jul 2019 19:33] Daniel Price
Posted by developer:
 
Fixed as of the upcoming 8.0.17 release, and here's the changelog entry:

A regression introduced in MySQL 8.0.14 caused a Invalid (old?) table or
database name error when creating a partitioned table on a MySQL instance
with lower_case_table_names=1. The change that caused the regression has
been reverted.