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

Explain shows PUSHED ,even when there is no pushdown

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 13.2
    • 13.2
    • Optimizer
    • None
    • Unexpected results
    • Q4/2026 Server Maintenance

    Description

      Issue:

      ------
      After MDEV-41340 fix , stmt isn't pushed down to remote server but explain output still shows "PUSHED"

      Issue details:

      ------------------
      Create view with LIMIT : Multi update succeeds i.e. there is No pushdown --But explain shows pushed derived ,bug ??

      Query:

      --------------
      create view v1 as select * from s1 limit 1;
      UPDATE s1 JOIN v1 SET s1.a = 1 where v1.a <3; //Note: s1 is table

      General log:

      -----------------------
      4 Query UPDATE `s1` SET `a` = 1 WHERE `a` = 2 LIMIT 1
      4 Query UPDATE `s1` SET `a` = 1 WHERE `a` = 3 LIMIT 1

      Series of update..LIMIT1 stmt , so it's confirmed ,stmt isn't pushed down to remote server.

      MariaDB [m8]> explain UPDATE s1 JOIN v1 SET s1.a = 1 where v1.a <3;
      +------+----------------+------------+------+---------------+------+---------+------+------+-------------+
      | id   | select_type    | table      | type | possible_keys | key  | key_len | ref  | rows | Extra       |
      +------+----------------+------------+------+---------------+------+---------+------+------+-------------+
      |    1 | PRIMARY        | <derived2> | ALL  | NULL          | NULL | NULL    | NULL | 2    | Using where |
      |    1 | PRIMARY        | s1         | ALL  | NULL          | NULL | NULL    | NULL | 3    |             |
      |    2 | PUSHED DERIVED | NULL       | NULL | NULL          | NULL | NULL    | NULL | NULL | NULL        |
      +------+----------------+------------+------+---------------+------+---------+------+------+-------------+
      

      Version used:

      ----------------
      Branch : 13.2-MDEV-39226-direct-multi_table-update-delete
      commit: 2db22df80520f0196b0c518e6bb146b07739ff3f
      Version : 13.1.0

      How to repeat:

      ----------------
      Slave:

      create table s1( a int);
      

      Master: Start server with federated engine enabled

      create table s1(a int)  ENGINE="FEDERATED" CONNECTION='mysql://u3:pass1@127.0.0.1:3306/m8/s1';
      insert into s1 values (1),(2),(3);
       
      set global federated_pushdown=ON;
      drop view if exists v1;
      create view v1 as select * from s1 limit 1;
      explain UPDATE s1 JOIN v1 SET s1.a = 1 where v1.a <3; //Notice: Explain output shows pushed derived.
      

      Attachments

        Issue Links

          Activity

            People

              bsrikanth Srikanth Bondalapati
              mariadb-pavithrapandith Pavithra Pandith
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 0d
                  0d
                  Remaining:
                  Remaining Estimate - 2d
                  2d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified

                  Git Integration

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