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

unary_minus(const_expr) will compute const_expr on fix_fields

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.5(EOL)
    • 10.6
    • Optimizer
    • None

    Description

      create table t1 (a int);
      insert into t1 select seq from seq_1_to_10;
      create table t2 (a int, b int);
      insert into t2 select seq,seq from seq_1_to_10000;
      

      explain select -(select max(a) from t2) from t1;
      

      Takes 6.746 sec

      analyze format=json select -(select max(a) from t2) from t1;
      {
        "query_optimization": {
          "r_total_time_ms": 7413.537268
        },
        "query_block": {
          "select_id": 1,
          "cost": 0.0124848,
          "r_loops": 1,
          "r_total_time_ms": 0.095447472,
      ...
      

      Shows the time is spent in the optimizer.

      Please check the affected/fixversion.

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            psergei Sergei Petrunia
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.