[MDEV-15714] Remove the use of STRING_ITEM from the parser Created: 2018-03-29  Updated: 2018-03-29  Resolved: 2018-03-29

Status: Closed
Project: MariaDB Server
Component/s: Data types
Affects Version/s: None
Fix Version/s: 10.3.6

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

Issue Links:
Blocks
blocks MDEV-4912 Data type plugin API version 1 Closed
blocks MDEV-14630 Replace {STRING|INT|REAL|DECIMAL|DATE... Closed

 Description   

We'll be replacing data type specific constants STRING_ITEM, INT_ITEM, REAL_ITEM, DECIMAL_ITEM, DATE_ITEM to LITERAL_ITEM soon (see MDEV-14630).

Under terms of this task we'll remove STRING_ITEM from:

  • The code creating concatenated string literals:

    Item *THD::make_string_literal_concat(Item *item, const LEX_CSTRING &str)
    

    Instead of testing item->type() for STRING_ITEM, we'll add a virtual method:

    virtual Item_basic_constant *Item_basic_constant::make_string_literal_concat(THD *thd, const LEX_CSTRING *)
    

    with implementations for Item_null and Item_string, and a default implementation for Item.

  • The rule in the bison grammar that parses ODBC style literals:

    | '{' ident expr '}'
    

    Instead of testing $3->type() for STRING_ITEM, we'll add a virtual method:

    virtual Item *Item::make_odbc_literal(THD *thd, const LEX_CSTRING *typestr);
    

    with an implementation for Item_string, and a default implementation for Item.


Generated at Thu Feb 08 08:23:28 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.