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

Assertion `0' failed in Protocol::end_statement upon multi-table delete with foreign key

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL)
    • 10.5, 10.6, 10.11, 11.4
    • Server
    • None

    Description

      --source include/have_innodb.inc
       
      create table t1 (pk int, b int, primary key(pk), foreign key (b) references t1 (pk)) engine=InnoDB;
      insert into t1 values (1,1),(2,2);
       
      create table t2 (pk int primary key) engine=InnoDB;
      insert into t2 values (3),(4); # Optional, fails either way
       
      delete ignore t1.* from t1 left join t2 on (t1.pk = t2.pk);
       
      drop table t1, t2;
      

      10.2 259e5243

      mysqld: /data/src/10.2/sql/protocol.cc:599: void Protocol::end_statement(): Assertion `0' failed.
      210302  0:55:09 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f26b6857f36 in __GI___assert_fail (assertion=0x55e6224af4b0 "0", file=0x55e6224af180 "/data/src/10.2/sql/protocol.cc", line=599, function=0x55e6224af3d0 "void Protocol::end_statement()") at assert.c:101
      #8  0x000055e62197ec6b in Protocol::end_statement (this=0x7f2660001348) at /data/src/10.2/sql/protocol.cc:599
      #9  0x000055e621a5bfd1 in dispatch_command (command=COM_QUERY, thd=0x7f2660000d90, packet=0x7f2660008b51 "delete ignore t1.* from t1 left join t2 on (t1.pk = t2.pk)", packet_length=58, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:2385
      #10 0x000055e621a58fc5 in do_command (thd=0x7f2660000d90) at /data/src/10.2/sql/sql_parse.cc:1381
      #11 0x000055e621bb3a26 in do_handle_one_connection (connect=0x55e6243d47e0) at /data/src/10.2/sql/sql_connect.cc:1336
      #12 0x000055e621bb378b in handle_one_connection (arg=0x55e6243d47e0) at /data/src/10.2/sql/sql_connect.cc:1241
      #13 0x000055e6223dc7c8 in pfs_spawn_thread (arg=0x55e6243b7bd0) at /data/src/10.2/storage/perfschema/pfs.cc:1869
      #14 0x00007f26b6d69609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #15 0x00007f26b6943293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Reproducible on 10.2-10.6.
      No obvious immediate problem on a non-debug build.

      Attachments

        Issue Links

          Activity

            People

              rucha174 Rucha Deodhar
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.