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

Remove unneded code in join_read_always_key()

    XMLWordPrintable

Details

    Description

      join_read_always_key() has this code:

      static int
      join_read_always_key(JOIN_TAB *tab)
      {
        int error;
        TABLE *table= tab->table;
       
        /* Initialize the index first */
        if (!table->file->inited)
        {
          if (unlikely((error= table->file->ha_index_init(tab->ref.key,
                                                          tab->sorted))))
          {
            (void) report_error(table, error);
            return 1;
          }
        }
       
        if (unlikely(cp_buffer_from_ref(tab->join->thd, table, &tab->ref)))
          return -1;
        if (unlikely((error=
                      table->file->prepare_index_key_scan_map(tab->ref.key_buff,
                                                              make_prev_keypart_map(tab->ref.key_parts))))) 
      

      The if (!table->file->inited) {...} part is (or should be) redundant. This task is to remove it. Wait for the testsuite to pass .

      Attachments

        Activity

          People

            oleg.smirnov Oleg Smirnov
            psergei Sergei Petrunia
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.