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

Object Longlong_hybrid in bison union

    XMLWordPrintable

Details

    • Bug
    • Status: Approved (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.8
    • 11.8
    • Parser
    • None
    • Q2/2026 Server Maintenance

    Description

      Reported by bar.

      The following was introduced in a MDEV-28152 patch 374783c3d9a87170b313a05240dadaa813ec6034:

      modified   sql/sql_yacc.yy
      @@ -195,6 +195,11 @@ void _CONCAT_UNDERSCORED(turn_parser_debug_on,yyparse)()
         ulonglong ulonglong_number;
         longlong longlong_number;
         uint sp_instr_addr;
      +  /*
      +    Longlong_hybrid does not have a default constructor, hence the
      +    default value below.
      +  */
      +  Longlong_hybrid longlong_hybrid_number= Longlong_hybrid(0, false);
       
         /* structs */
         LEX_CSTRING lex_str;
      

      But bison unions should only contain POD data: https://www.gnu.org/software/bison/manual/html_node/C_002b_002b-Unions.html

      bar reported that the small query "SELECT 1" calls this initialisation around 100 times.

      Attachments

        Issue Links

          Activity

            People

              ycp Yuchen Pei
              ycp Yuchen Pei
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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