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

INSERT ... SELECT Does not produce an optimizer trace

Details

    Description

      INSERT ... SELECT statement does not produce optimizer trace:

      create table t100 (a int, b int);
      create table t101 (a int, b int);
      insert into t101 select seq, seq from seq_1_to_1000;
      set optimizer_trace=1;
      insert into t100 select * from t101 where a<= b and a >4;
      

      MariaDB [test]> select * from information_schema.optimizer_trace\G
      Empty set (0.002 sec)
      

      It should produce it.

      Attachments

        Activity

          oleg.smirnov Oleg Smirnov added a comment -

          Please review bb-10.5-mdev-29298.

          oleg.smirnov Oleg Smirnov added a comment - Please review bb-10.5-mdev-29298.

          The patch itself is ok. The testcase seems to large. The contents of the optimizer trace are actually irrelevant.
          Please change

          +select * from information_schema.optimizer_trace;
          

          to something like

          +select QUERY, LENGTH(trace)>1 from information_schema.optimizer_trace;
          

          Ok to push after this is addressed.

          psergei Sergei Petrunia added a comment - The patch itself is ok. The testcase seems to large. The contents of the optimizer trace are actually irrelevant. Please change +select * from information_schema.optimizer_trace; to something like +select QUERY, LENGTH(trace)>1 from information_schema.optimizer_trace; Ok to push after this is addressed.
          oleg.smirnov Oleg Smirnov added a comment -

          Addressed the comment and pushed to 10.5

          oleg.smirnov Oleg Smirnov added a comment - Addressed the comment and pushed to 10.5

          People

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