[MDEV-26376] pars_info_bind_id() unnecessarily copies strings Created: 2021-08-16  Updated: 2021-08-16  Resolved: 2021-08-16

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 5.5, 10.0, 10.1, 10.2, 10.3, 10.4, 10.5, 10.6, 10.7
Fix Version/s: 10.2.41, 10.3.32, 10.4.22, 10.5.13, 10.6.5

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: fulltext, performance, upstream


 Description   

The function pars_info_bind_id() is unnecessarily copying string keys. Not only is the parameter copy_name always being passed as nonzero, but that parameter could actually have always been specified as zero. For all calls except one, a compile-time constant string is being passed as a parameter. For the call in fts_get_select_columns_str() and fts_doc_fetch_by_doc_id(), the passed string will already be allocated from the same memory heap that pars_info_bind_id() is using.


Generated at Thu Feb 08 09:44:50 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.