Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-10142 PL/SQL parser
  3. MDEV-13531

Add Database_qualified_name::copy()

    XMLWordPrintable

Details

    • 10.2.2-3, 10.2.2-1, 10.2.2-2, 10.2.2-4, 10.1.18

    Description

      We'll move this code in sp_head::init_sp_name():

        /* We have to copy strings to get them into the right memroot. */
       
        m_db.length= spname->m_db.length;
        m_db.str= strmake_root(thd->mem_root, spname->m_db.str, spname->m_db.length);
       
        m_name.length= spname->m_name.length;
        m_name.str= strmake_root(thd->mem_root, spname->m_name.str,
                                 spname->m_name.length);
      

      to a new method in Database_qualified_name:

      void Database_qualified_name::copy(MEM_ROOT *mem_root,
                                         const LEX_CSTRING &db,
                                         const LEX_CSTRING &name)
      {
        m_db.length= db.length;
        m_db.str= strmake_root(mem_root, db.str, db.length);
        m_name.length= name.length;
        m_name.str= strmake_root(mem_root, name.str, name.length);
      }
      

      It will be easier to reuse this code this way, e.g. for MDEV-10591.

      Attachments

        Issue Links

          Activity

            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.