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

Crash with DELETE FROM in DuckDB table and incorrect mixed DML processing

    XMLWordPrintable

Details

    Description

      With MDEV-40265 fixed I started playing with the UUID example from the blog.

      CREATE TABLE invoice (
      id UUID DEFAULT(uuid()) PRIMARY KEY,
      product VARCHAR(64),
      amount DECIMAL(12,2),
      sold_at TIMESTAMP ) ENGINE=DuckDB DEFAULT CHARSET utf8mb4;

      INSERT INTO invoice (product, amount, sold_at)
      VALUES ('MariaDB mug', 12.00, NOW()),
      ('DuckDB sticker', 2.50, NOW()),
      ('Sea lion plush', 25.00, NOW()),
      ('DuckDB sticker', 2.50, NOW());

      DELETE FROM invoice WHERE id = 'id';

      SQL Error [1031] [HY000]: (conn=14) Storage engine DUCKDB of the table `site_statistics`.`invoice` doesn't have this option

      DELETE FROM invoice;

      Complete server crash.

      260830 19:47:00 [ERROR] mariadbd got signal 11 ;
      Sorry, we probably made a mistake, and this is a bug.

      Your assistance in bug reporting will enable us to fix this for the next release.
      To report this bug, see https://mariadb.com/docs/general-resources/community/community/bug-tracking/reporting-bugs about how to report
      a bug on https://jira.mariadb.org/.

      Please include the information from the server start above, to the end of the
      information below.

      Server version: 11.8.9-MariaDB-deb13-log source revision: bf9193a939f515e95dd8def1a5468088c91cede6

      The information page at https://mariadb.com/docs/server/reference/product-development/mariadb-fault-finding/how-to-produce-a-full-stack-trace-for-mariadbdcontains instructions to obtain a better version of the backtrace below.
      Following these instructions will help MariaDB developers provide a fix quicker.

      Attempting backtrace. Include this in the bug report.
      (note: Retrieving this information may fail)

      Thread pointer: 0x56eb33cce018
      stack_bottom = 0x758c1f7ff000 thread_stack 0x49000
      Printing to addr2line failed
      mariadbd(my_print_stacktrace+0x32) [0x56eae59bb662]
      mariadbd(handle_fatal_signal+0x1cf) [0x56eae54ecfdf]
      /lib/x86_64-linux-gnu/libc.so.6(+0x3fdf0) [0x7d8c33e16df0]
      /usr/lib/mysql/plugin/ha_duckdb.so(_ZN13DeltaAppender17append_row_deleteEP5TABLEyPKh+0xe1) [0x7d8c2a707251]
      /usr/lib/mysql/plugin/ha_duckdb.so(_ZN9ha_duckdb10delete_rowEPKh+0x5b) [0x7d8c2a6ec0bb]
      mariadbd(_ZN7handler13ha_delete_rowEPKh+0x156) [0x56eae54fea86]
      mariadbd(_ZN14Sql_cmd_delete24delete_from_single_tableEP3THD+0x1317) [0x56eae52299f7]
      mariadbd(_ZN14Sql_cmd_delete13execute_innerEP3THD+0x156) [0x56eae522ad66]
      mariadbd(_ZN11Sql_cmd_dml7executeEP3THD+0xe1) [0x56eae52afdc1]
      mariadbd(_Z21mysql_execute_commandP3THDb+0xfb1) [0x56eae5274d91]
      mariadbd(_Z11mysql_parseP3THDPcjP12Parser_state+0x1cb) [0x56eae52794fb]
      mariadbd(_Z16dispatch_command19enum_server_commandP3THDPcjb+0x1913) [0x56eae527be33]
      mariadbd(_Z10do_commandP3THDb+0x145) [0x56eae527d6b5]
      mariadbd(_Z24do_handle_one_connectionP7CONNECTb+0x385) [0x56eae53a57a5]
      mariadbd(handle_one_connection+0x6d) [0x56eae53a5b4d]
      mariadbd(+0xd2c194) [0x56eae571c194]
      /lib/x86_64-linux-gnu/libc.so.6(+0x92b7b) [0x7d8c33e69b7b]
      /lib/x86_64-linux-gnu/libc.so.6(__clone+0x40) [0x7d8c33ee7630]

      Connection ID (thread ID): 9
      Status: NOT_KILLED
      Query (0x56eb33d0a030): DELETE FROM invoice

      Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off,hash_join_cardinality=on,cset_narrowing=on,sargable_casefold=on

      Writing a core file...
      Working directory at /app/data/db
      Resource Limits (excludes unlimited resources):
      Limit Soft Limit Hard Limit Units
      Max stack size 8388608 unlimited bytes
      Max processes 2048 4096 processes
      Max open files 36705 36705 files
      Max locked memory 8388608 8388608 bytes
      Max pending signals 128082 128082 signals
      Max msgqueue size 819200 819200 bytes
      Max nice priority 0 0
      Max realtime priority 0 0
      Core pattern: |/usr/lib/systemd/systemd-coredump %P %u %g %s %t 9223372036854775808 %h %d

      Kernel version: Linux version 6.8.0-106-generic (buildd@lcy02-amd64-074) (x86_64-linux-gnu-gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0, GNU ld (GNU Binutils for Ubuntu) 2.42) #106-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 6 07:58:08 UTC 2026

      Attachments

        Issue Links

          Activity

            People

              drrtuy Roman
              f.bosch@genkgo.nl Frederik Bosch
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.