[MDEV-31954] Cleanup in check_table_name() and check_db_name() Created: 2023-08-18  Updated: 2023-09-17  Resolved: 2023-08-18

Status: Closed
Project: MariaDB Server
Component/s: Character Sets
Fix Version/s: 11.3.0

Type: Task Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-31606 Refactor check_db_name() to get a con... Closed

 Description   

The code in check_table_name() and check_db_name() looks confusing.
Let's do minor cleanups:

  • Rename the parameter check_for_path_char to a more self-descriptive disallow_path_chars
  • Rename the variable name_length in check_table_name() to a more self-descriptive char_length.
  • Fix the while loop in check_table_name() into a for loop and replace multiple char_length+ (the former name_length+) statements to a signle increment statement in the for loop header.

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