Bug #95576 MySQL 8.0.16 partition table report error log
Submitted: 30 May 2019 12:04 Modified: 6 Jun 2019 12:56
Reporter: Zhao Jianwei Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:8.0.16 OS:Red Hat
Assigned to: CPU Architecture:Any

[30 May 2019 12:04] Zhao Jianwei
Description:
Hi guys

When I create partition table on MySQL 8.0.16 release version, Server recorded lots of error logs.  like:

how to repeat, see the test case.

./mysql-test-run.pl --initialize=--lower_case_table_names=1  t/t.test

2019-05-30T11:59:59.241034Z 9 [ERROR] [MY-010520] [Server] Invalid (old?) table or database name 'test#p#p0'
.... repeated 5 times: [ERROR] [MY-010520] [Server] Invalid (old?) table or database name 'test#p#p0'
2019-05-30T11:59:59.244630Z 9 [ERROR] [MY-010520] [Server] Invalid (old?) table or database name 'test#p#p1'
.... repeated 5 times: [ERROR] [MY-010520] [Server] Invalid (old?) table or database name 'test#p#p1'
2019-05-30T11:59:59.247277Z 9 [ERROR] [MY-010520] [Server] Invalid (old?) table or database name 'test#p#p2'
.... repeated 5 times: [ERROR] [MY-010520] [Server] Invalid (old?) table or database name 'test#p#p2'
2019-05-30T11:59:59.249800Z 9 [ERROR] [MY-010520] [Server] Invalid (old?) table or database name 'test#p#p3'
.... repeated 5 times: [ERROR] [MY-010520] [Server] Invalid (old?) table or database name 'test#p#p3'

How to repeat:
see the test case file.
[30 May 2019 12:06] Zhao Jianwei
test case

Attachment: t.test (application/octet-stream, text), 316 bytes.

[30 May 2019 12:10] Zhao Jianwei
It‘s on linux platform.
[30 May 2019 12:20] MySQL Verification Team
Hello Zhao Jianwei,

Thank you for the report and test case.

regards,
Umesh
[31 May 2019 3:45] Ze Yang
The code on Linux, the PART_SEPARATOR is #P. But now the partition table file use #p.
May be this would have many influence.

storage/innobase/include/univ.i
712 #ifdef _WIN32
713 constexpr char PART_SEPARATOR[PART_SEPARATOR_LEN + 1] = "#p#";
714 constexpr char SUB_PART_SEPARATOR[SUB_PART_SEPARATOR_LEN + 1] = "#sp#";
715 #else
716 constexpr char PART_SEPARATOR[PART_SEPARATOR_LEN + 1] = "#P#";
717 constexpr char SUB_PART_SEPARATOR[SUB_PART_SEPARATOR_LEN + 1] = "#SP#";
718 #endif /* _WIN32 */

storage/innobase/handler/ha_innodb.cc
21152   /* For partition table, remove the partition name and use the
21153   "main" table name to build the template */
21154 #ifdef _WIN32
21155   char *is_part = strstr(tbname, "#p#");
21156 #else
21157   char *is_part = strstr(tbname, "#P#");
21158 #endif /* _WIN32 */
[6 Jun 2019 12:56] Erlend Dahl
Duplicate of

Bug#94519 Wrong messages in error-log when using partition with lower-case-table-names=1