Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-15714

Remove the use of STRING_ITEM from the parser

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 10.3.6
    • Data types
    • None

    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.

      Attachments

        Issue Links

          Activity

            bar Alexander Barkov created issue -
            bar Alexander Barkov made changes -
            Field Original Value New Value
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            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:

            {code:cpp}
            Item *THD::make_string_literal_concat(Item *item, const LEX_CSTRING &str)
            {code}

            Instead of testing {{item->type()}} for {{STRING_ITEM}}, we'll add a virtual method:
            {code:cpp}
            virtual Item_basic_constant *make_string_literal_concat(THD *thd,
                                                                    const LEX_CSTRING *)
            {code}
            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:

            {noformat}
            | '{' ident expr '}'
            {noformat}

            Instead of testing {{$3->type()}} for {{STRING_ITEM}}, we'll add a virtual method:
            {code:cpp}
            virtual Item *make_odbc_literal(THD *thd, const LEX_CSTRING *typestr);
            {code}
            with an implementation for {{Item_string}}, and a default implementation for {{Item}}.
            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:
            - h3. The code creating concatenated string literals:

            {code:cpp}
            Item *THD::make_string_literal_concat(Item *item, const LEX_CSTRING &str)
            {code}

            Instead of testing {{item->type()}} for {{STRING_ITEM}}, we'll add a virtual method:
            {code:cpp}
            virtual Item_basic_constant *make_string_literal_concat(THD *thd,
                                                                    const LEX_CSTRING *)
            {code}
            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:

            {noformat}
            | '{' ident expr '}'
            {noformat}

            Instead of testing {{$3->type()}} for {{STRING_ITEM}}, we'll add a virtual method:
            {code:cpp}
            virtual Item *make_odbc_literal(THD *thd, const LEX_CSTRING *typestr);
            {code}
            with an implementation for {{Item_string}}, and a default implementation for {{Item}}.
            bar Alexander Barkov made changes -
            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:
            - h3. The code creating concatenated string literals:

            {code:cpp}
            Item *THD::make_string_literal_concat(Item *item, const LEX_CSTRING &str)
            {code}

            Instead of testing {{item->type()}} for {{STRING_ITEM}}, we'll add a virtual method:
            {code:cpp}
            virtual Item_basic_constant *make_string_literal_concat(THD *thd,
                                                                    const LEX_CSTRING *)
            {code}
            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:

            {noformat}
            | '{' ident expr '}'
            {noformat}

            Instead of testing {{$3->type()}} for {{STRING_ITEM}}, we'll add a virtual method:
            {code:cpp}
            virtual Item *make_odbc_literal(THD *thd, const LEX_CSTRING *typestr);
            {code}
            with an implementation for {{Item_string}}, and a default implementation for {{Item}}.
            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:
            - h2. The code creating concatenated string literals:

            {code:cpp}
            Item *THD::make_string_literal_concat(Item *item, const LEX_CSTRING &str)
            {code}

            Instead of testing {{item->type()}} for {{STRING_ITEM}}, we'll add a virtual method:
            {code:cpp}
            virtual Item_basic_constant *make_string_literal_concat(THD *thd,
                                                                    const LEX_CSTRING *)
            {code}
            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:

            {noformat}
            | '{' ident expr '}'
            {noformat}

            Instead of testing {{$3->type()}} for {{STRING_ITEM}}, we'll add a virtual method:
            {code:cpp}
            virtual Item *make_odbc_literal(THD *thd, const LEX_CSTRING *typestr);
            {code}
            with an implementation for {{Item_string}}, and a default implementation for {{Item}}.
            bar Alexander Barkov made changes -
            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:
            - h2. The code creating concatenated string literals:

            {code:cpp}
            Item *THD::make_string_literal_concat(Item *item, const LEX_CSTRING &str)
            {code}

            Instead of testing {{item->type()}} for {{STRING_ITEM}}, we'll add a virtual method:
            {code:cpp}
            virtual Item_basic_constant *make_string_literal_concat(THD *thd,
                                                                    const LEX_CSTRING *)
            {code}
            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:

            {noformat}
            | '{' ident expr '}'
            {noformat}

            Instead of testing {{$3->type()}} for {{STRING_ITEM}}, we'll add a virtual method:
            {code:cpp}
            virtual Item *make_odbc_literal(THD *thd, const LEX_CSTRING *typestr);
            {code}
            with an implementation for {{Item_string}}, and a default implementation for {{Item}}.
            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:
            - h2. The code creating concatenated string literals:

            {code:cpp}
            Item *THD::make_string_literal_concat(Item *item, const LEX_CSTRING &str)
            {code}

            Instead of testing {{item->type()}} for {{STRING_ITEM}}, we'll add a virtual method:
            {code:cpp}
            virtual Item_basic_constant *make_string_literal_concat(THD *thd,
                                                                    const LEX_CSTRING *)
            {code}
            with implementations for {{Item_null}} and {{Item_string}}, and a default implementation for {{Item}}.

            - h2. The rule in the bison grammar that parses ODBC style literals:

            {noformat}
            | '{' ident expr '}'
            {noformat}

            Instead of testing {{$3->type()}} for {{STRING_ITEM}}, we'll add a virtual method:
            {code:cpp}
            virtual Item *make_odbc_literal(THD *thd, const LEX_CSTRING *typestr);
            {code}
            with an implementation for {{Item_string}}, and a default implementation for {{Item}}.
            bar Alexander Barkov made changes -
            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:
            - h2. The code creating concatenated string literals:

            {code:cpp}
            Item *THD::make_string_literal_concat(Item *item, const LEX_CSTRING &str)
            {code}

            Instead of testing {{item->type()}} for {{STRING_ITEM}}, we'll add a virtual method:
            {code:cpp}
            virtual Item_basic_constant *make_string_literal_concat(THD *thd,
                                                                    const LEX_CSTRING *)
            {code}
            with implementations for {{Item_null}} and {{Item_string}}, and a default implementation for {{Item}}.

            - h2. The rule in the bison grammar that parses ODBC style literals:

            {noformat}
            | '{' ident expr '}'
            {noformat}

            Instead of testing {{$3->type()}} for {{STRING_ITEM}}, we'll add a virtual method:
            {code:cpp}
            virtual Item *make_odbc_literal(THD *thd, const LEX_CSTRING *typestr);
            {code}
            with an implementation for {{Item_string}}, and a default implementation for {{Item}}.
            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:
            - h2. The code creating concatenated string literals:
            {code:cpp}
            Item *THD::make_string_literal_concat(Item *item, const LEX_CSTRING &str)
            {code}
            Instead of testing {{item->type()}} for {{STRING_ITEM}}, we'll add a virtual method:
            {code:cpp}
            virtual Item_basic_constant *make_string_literal_concat(THD *thd,
                                                                    const LEX_CSTRING *)
            {code}
            with implementations for {{Item_null}} and {{Item_string}}, and a default implementation for {{Item}}.

            - h2. The rule in the bison grammar that parses ODBC style literals:
            {noformat}
            | '{' ident expr '}'
            {noformat}
            Instead of testing {{$3->type()}} for {{STRING_ITEM}}, we'll add a virtual method:
            {code:cpp}
            virtual Item *make_odbc_literal(THD *thd, const LEX_CSTRING *typestr);
            {code}
            with an implementation for {{Item_string}}, and a default implementation for {{Item}}.
            bar Alexander Barkov made changes -
            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:
            - h2. The code creating concatenated string literals:
            {code:cpp}
            Item *THD::make_string_literal_concat(Item *item, const LEX_CSTRING &str)
            {code}
            Instead of testing {{item->type()}} for {{STRING_ITEM}}, we'll add a virtual method:
            {code:cpp}
            virtual Item_basic_constant *make_string_literal_concat(THD *thd,
                                                                    const LEX_CSTRING *)
            {code}
            with implementations for {{Item_null}} and {{Item_string}}, and a default implementation for {{Item}}.

            - h2. The rule in the bison grammar that parses ODBC style literals:
            {noformat}
            | '{' ident expr '}'
            {noformat}
            Instead of testing {{$3->type()}} for {{STRING_ITEM}}, we'll add a virtual method:
            {code:cpp}
            virtual Item *make_odbc_literal(THD *thd, const LEX_CSTRING *typestr);
            {code}
            with an implementation for {{Item_string}}, and a default implementation for {{Item}}.
            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:
            - h2. The code creating concatenated string literals:
            {code:cpp}
            Item *THD::make_string_literal_concat(Item *item, const LEX_CSTRING &str)
            {code}
            Instead of testing {{item->type()}} for {{STRING_ITEM}}, we'll add a virtual method:
            {code:cpp}
            virtual Item_basic_constant *Item_basic_constant::make_string_literal_concat(THD *thd,
                                                                                                                                           const LEX_CSTRING *)
            {code}
            with implementations for {{Item_null}} and {{Item_string}}, and a default implementation for {{Item}}.

            - h2. The rule in the bison grammar that parses ODBC style literals:
            {noformat}
            | '{' ident expr '}'
            {noformat}
            Instead of testing {{$3->type()}} for {{STRING_ITEM}}, we'll add a virtual method:
            {code:cpp}
            virtual Item *Item::make_odbc_literal(THD *thd, const LEX_CSTRING *typestr);
            {code}
            with an implementation for {{Item_string}}, and a default implementation for {{Item}}.
            bar Alexander Barkov made changes -
            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:
            - h2. The code creating concatenated string literals:
            {code:cpp}
            Item *THD::make_string_literal_concat(Item *item, const LEX_CSTRING &str)
            {code}
            Instead of testing {{item->type()}} for {{STRING_ITEM}}, we'll add a virtual method:
            {code:cpp}
            virtual Item_basic_constant *Item_basic_constant::make_string_literal_concat(THD *thd,
                                                                                                                                           const LEX_CSTRING *)
            {code}
            with implementations for {{Item_null}} and {{Item_string}}, and a default implementation for {{Item}}.

            - h2. The rule in the bison grammar that parses ODBC style literals:
            {noformat}
            | '{' ident expr '}'
            {noformat}
            Instead of testing {{$3->type()}} for {{STRING_ITEM}}, we'll add a virtual method:
            {code:cpp}
            virtual Item *Item::make_odbc_literal(THD *thd, const LEX_CSTRING *typestr);
            {code}
            with an implementation for {{Item_string}}, and a default implementation for {{Item}}.
            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:
            - h2. The code creating concatenated string literals:
            {code:cpp}
            Item *THD::make_string_literal_concat(Item *item, const LEX_CSTRING &str)
            {code}
            Instead of testing {{item->type()}} for {{STRING_ITEM}}, we'll add a virtual method:
            {code:cpp}
            virtual Item_basic_constant *Item_basic_constant::make_string_literal_concat(THD *thd, const LEX_CSTRING *)
            {code}
            with implementations for {{Item_null}} and {{Item_string}}, and a default implementation for {{Item}}.

            - h2. The rule in the bison grammar that parses ODBC style literals:
            {noformat}
            | '{' ident expr '}'
            {noformat}
            Instead of testing {{$3->type()}} for {{STRING_ITEM}}, we'll add a virtual method:
            {code:cpp}
            virtual Item *Item::make_odbc_literal(THD *thd, const LEX_CSTRING *typestr);
            {code}
            with an implementation for {{Item_string}}, and a default implementation for {{Item}}.
            bar Alexander Barkov made changes -
            issue.field.resolutiondate 2018-03-29 07:27:01.0 2018-03-29 07:27:01.133
            bar Alexander Barkov made changes -
            Component/s Data types [ 13906 ]
            Fix Version/s 10.3.6 [ 23003 ]
            Fix Version/s 10.3 [ 22126 ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 86282 ] MariaDB v4 [ 154048 ]

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.