Bug #96665 Remove handler::referenced_by_foreign_key() usage
Submitted: 27 Aug 2019 9:16 Modified: 30 Aug 2019 10:18
Reporter: Dmitry Lenev Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Storage Engine API Severity:S3 (Non-critical)
Version:8.0.18-git OS:Any
Assigned to: CPU Architecture:Any

[27 Aug 2019 9:16] Dmitry Lenev
Description:
In MySQL 8.0 all information about foreign keys is available from the
new data-dictionary, corresponding DD API and sometimes from TABLE_SHARE.

However, SQL-layer code still uses SE API to get some of this information
which results in code duplication at very least.

Specifically handler::referenced_by_foreign_key() method is used to check
if table is referenced by any foreign key, even though the same information
is available from TABLE_SHARE.

This SE API should be removed and code using it should be updated to use
TABLE_SHARE instead.

How to repeat:
Inspect code in sql/binlog.cc or sql/sql_insert.cc.
[30 Aug 2019 10:18] Paul DuBois
Posted by developer:
 
Fixed in 8.0.19.

Code cleanup. No changelog entry required.