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

Syntax error with federated_pushdown=ON and using IN operator with subquery

    XMLWordPrintable

Details

    • Can result in unexpected behaviour
    • Q4/2026 Server Development

    Description

      Issue:

      ---------
      With federated_pushdown=ON , query throws syntax error
      Note: With OFF , query executes fine.

      MariaDB [m8]> DELETE FROM D WHERE a IN ( SELECT a FROM D);
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'dual where `m8`.`D`.`a` in (select `m8`.`D`.`a` from `m8`.`D`)' at line 1

      Version used:

      ----------------
      Debug build
      Branch : 13.2-MDEV-39226-direct-multi_table-update-delete
      commit: daf3ee742c3bb191a5fd97649d4779419c9c9a4d
      Version : 13.1.0

      How to repeat:

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

      create table D( a int);
      

      Master: Start server with federated engine enabled

      create table D(a int)  ENGINE="FEDERATED" CONNECTION='mysql://u3@127.0.0.1:3306/m8/D';
       
      set global federated_pushdown=ON;
      DELETE FROM D WHERE a IN ( SELECT a FROM D);
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 1d 7h 26m
                  1d 7h 26m
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 1.25d Time Not Required
                  1.25d

                  Git Integration

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