Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
Class Database_qualified_name is currently used for two purposes when handling package routines such as `db.pkg.func`:
- to store the `db.pkg` pair
- to store the `pkg.func` pair
The data type of Database_qualified_name::m_name will be changed from LEX_CSTRING to Lex_ident_db soon, so it will contain a validated and normalized database name, which means lower-cased if lower-case-table-names says so.
Therefore, Database_qualified_name won't be able to store `pkg.func` pairs any more - the `pkg` part must not depend on lower-case-table-names.
Let's add a new class Identifier_chain2 and move the following methods from Database_qualified_name to Identifier_chain2, as follows:
class Identifier_chain2 |
{
|
LEX_CSTRING m_name[2];
|
public: |
Identifier_chain2(const LEX_CSTRING &a, const LEX_CSTRING &b) |
:m_name{a, b}
|
{ }
|
|
// These methods were in Database_qualified_name originally: |
|
static Identifier_chain2 split(const LEX_CSTRING &txt); |
|
size_t make_qname(char *dst, size_t dstlen) const; |
|
bool make_qname(MEM_ROOT *mem_root, LEX_CSTRING *dst) const; |
};
|
Also, let's change the data type of the following variables from Database_qualified_name to Identifier_chain2:
- q_pkg_proc in LEX::call_statement_start()
- q_pkg_func in LEX::make_item_func_call_generic()
Attachments
Issue Links
- blocks
-
MDEV-31531 Remove my_casedn_str() and my_caseup_str()
- Closed
-
MDEV-31606 Refactor check_db_name() to get a const argument
- Closed