[MDEV-31541] Optimize calls to build_table_filenames for CREATE TABLE Created: 2023-06-26  Updated: 2024-01-19

Status: Stalled
Project: MariaDB Server
Component/s: Data Definition - Create Table
Affects Version/s: None
Fix Version/s: 11.2

Type: Bug Priority: Major
Reporter: Michael Widenius Assignee: Michael Widenius
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-31918 Optimize check on sequences earlier f... Stalled

 Description   
  • When doing create table, we call build_table_filename 3 times:
  • In ha_table_exists() as part of upgrade_lock_if_not_exists()
  • Here we could mark in create_info if the table existed or not !
  • In mysql_create_table_no_lock()
  • In create_table_imp() to check if the table exists (again)

This task is to only call build_table_filename and ha_table_exists() once for CREATE TABLE

Suggested solution is to call build_table_filename() once at start of create table and store
name (and later a flag if table existed) in HA_CREATE_INFO.



 Comments   
Comment by Michael Widenius [ 2023-12-15 ]

I plan to look at this next week.

Generated at Thu Feb 08 10:24:39 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.