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

Sql_cmd_dml::execute_inner Sql_cmd_update::execute_inner do not call Select handler for the engine involved

    XMLWordPrintable

Details

    • Bug
    • Status: Stalled (View Workflow)
    • Critical
    • Resolution: Unresolved
    • None
    • 11.4, 11.8
    • None
    • None
    • Q4/2025 Server Maintenance, Q1/2026 Server Maintenance

    Description

      Fast >= 11.4 server analysis shows that Select handler is not called in case of multi-table update/deletes thus MCS DELETE/UPDATE pipeline that relied on this got broken.
      Consider scenario from MCOL issue attached below.
      Here is a log for ES 11.4. The linked MCOL has a scenario for ES 10.6 that doesn't have this issue.

      MariaDB [tpch1]> create table product_tag (product_id bigint)engine=columnstore;
      Query OK, 0 rows affected (0.454 sec)
       
      MariaDB [tpch1]> CREATE TABLE `product` (
          -> `product_id` bigint(20) DEFAULT NULL,
          -> `price` bigint(20) DEFAULT NULL,
          -> `short_description` varchar(7998) DEFAULT NULL,
          -> `brand` varchar(254) DEFAULT NULL,
          -> `modified_dtm` datetime DEFAULT NULL,
          -> `created_dtm` datetime DEFAULT NULL,
          -> `modified_by` int(11) DEFAULT NULL
          -> ) engine=columnstore DEFAULT CHARSET=latin1 ;
      Query OK, 0 rows affected (0.229 sec)
       
      MariaDB [tpch1]> insert into product_tag values (1),(2),(3),(4);
      Query OK, 4 rows affected (0.286 sec)
      Records: 4  Duplicates: 0  Warnings: 0
       
      MariaDB [tpch1]> insert into product values (1,22,'fes','rets','2011-12-12 12:12:12','2011-12-13 1:1:10',343);
      Query OK, 1 row affected (0.201 sec)
       
      MariaDB [tpch1]> insert into product values (3,22,'fes','rets','2011-12-12 12:12:12','2011-12-13 1:1:10',343);
      Query OK, 1 row affected (0.134 sec)
       
      MariaDB [tpch1]> select * from product;
      +------------+-------+-------------------+-------+--------------+-------------+-------------+
      | product_id | price | short_description | brand | modified_dtm | created_dtm | modified_by |
      +------------+-------+-------------------+-------+--------------+-------------+-------------+
      |          1 |    22 | fes               | rets  | 2011-12-12 12:12:12 | 2011-12-13 01:01:10 |         343 |
      |          3 |    22 | fes               | rets  | 2011-12-12 12:12:12 | 2011-12-13 01:01:10 |         343 |
      +------------+-------+-------------------+-------+--------------+-------------+-------------+
      2 rows in set (0.131 sec)
       
      MariaDB [tpch1]> update
          -> product p join
          -> (select product_id from product_tag limit 1000) t using (product_id)
          -> set brand=p.product_id, price=555, modified_dtm='2011-12-15 15:15:30',
          -> short_description=concat(short_description,modified_by);
      Query OK, 0 rows affected (0.029 sec)
      Rows matched: 0  Changed: 0  Warnings: 0
       
      MariaDB [tpch1]> select * from product;
      +------------+-------+-------------------+-------+--------------+-------------+-------------+
      | product_id | price | short_description | brand | modified_dtm | created_dtm | modified_by |
      +------------+-------+-------------------+-------+--------------+-------------+-------------+
      |          1 |    22 | fes               | rets  | 2011-12-12 12:12:12 | 2011-12-13 01:01:10 |         343 |
      |          3 |    22 | fes               | rets  | 2011-12-12 12:12:12 | 2011-12-13 01:01:10 |         343 |
      +------------+-------+-------------------+-------+--------------+-------------+-------------+
      2 rows in set (0.007 sec)
      

      Attachments

        Issue Links

          Activity

            People

              raghunandan.bhat Raghunandan Bhat
              drrtuy Roman
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated: