Bug #96646 rewrite_rules table's `pattern_database` column from Query Rewrite is short

Submitted: 26 Aug 2019 4:26 Modified: 26 Aug 2019 7:38
Reporter: hao chen Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S4 (Feature request)
Version:5.7.24 OS:Any
Assigned to: CPU Architecture:Any
Tags: Query Rewrite

[26 Aug 2019 4:26] hao chen
Description:
   We kown the database name have a maximum length  of 64 bits,here is the `Db` column from  mysql.db table structure :

    `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',

but in query rewrite plugin ,the pattern_database column that match the database name field from query_rewrite.rewrite_rules is just 20 bits,here is the `pattern_database` column from query_rewrite.rewrite_rules table structure :

    pattern_database VARCHAR(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,

therefore,if one database name is greater than 20 bits , this results in the database name not being written in the query_rewrite.rewrite_rule table;

How to repeat:
Increase the default length of the  pattern_database field .
[26 Aug 2019 7:38] MySQL Verification Team
Hello hao chen,

Thank you for the report.
Marking this as duplicate of Bug #96647, please see Bug #96647

regards,
Umesh

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.