PL/SQL parser (MDEV-10142)

[MDEV-12392] Duplicate code cleanup: add function normalize_db_name() Created: 2017-03-29  Updated: 2018-08-31  Resolved: 2017-03-29

Status: Closed
Project: MariaDB Server
Component/s: Parser
Affects Version/s: 10.3
Fix Version/s: 10.3.0

Type: Technical task Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: Compatibility, refactoring

Issue Links:
Blocks
blocks MDEV-10591 Oracle-style packages Closed
Sprint: 10.2.2-3, 10.2.2-1, 10.2.2-2, 10.2.2-4, 10.1.18

 Description   

There is a duplicate code in sql_db.cc, in functions mysql_create_db_internal() and mysql_rm_db_internal().

char db_tmp[SAFE_NAME_LEN], *dbnorm;
if (lower_case_table_names)
{
  strmake_buf(db_tmp, db);
  my_casedn_str(system_charset_info, db_tmp);
  dbnorm= db_tmp;
}
else
  dbnorm= db;

Will introduce a new function normalize_db_name() and reuse it.

This change was originally a part of MDEV-11952, but it was decided to commit it as a standalone change.



 Comments   
Comment by Alexander Barkov [ 2017-03-29 ]

Pushed to bb-10.2-ext

Generated at Thu Feb 08 07:57:22 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.