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

10.11.11 degradation in create table with insert

    XMLWordPrintable

Details

    Description

      Seeing a hard crash and in cases data loss in mariadb:10.11.11 on docker image mariadb:10.11.11 and on ubuntu 24.04 LTS, recreatable with a create table with select containing where and join (the specific examples below, have not tested this much more widely).

      We can change SQL to not crash but it used to "just work".

      Failing query:

      CREATE TABLE `testcasefail` ( `note_id` int, `user_id` int, `houseid` int ) ENGINE=INNODB DEFAULT CHARSET=utf8mb4    select `A0`.`note_id`, `A1`.`user_id`, `A1`.`houseid` FROM `person` AS `A1` LEFT JOIN `notes` AS `A0` ON `A0`.`user_id` = `A1`.`user_id` OR (`A0`.`houseid` > 0 AND `A0`.`houseid` = `A1`.`houseid`) WHERE `note_type_id` = 45;
      

      An altered query (move the where to the join) works:

      CREATE TABLE `testcasesuccess` ( `note_id` int, `user_id` int, `houseid` int ) ENGINE=INNODB DEFAULT CHARSET=utf8mb4    select `A0`.`note_id`, `A1`.`user_id`, `A1`.`houseid` FROM `person` AS `A1` LEFT JOIN `notes` AS `A0` ON `A0`.`note_type_id` = 45 AND (`A0`.`user_id` = `A1`.`user_id` OR (`A0`.`houseid` > 0 AND `A0`.`houseid` = `A1`.`houseid`));
      

      Attached is a basic database to recreate our test case.

      Attachments

        Issue Links

          Activity

            People

              thiru Thirunarayanan Balathandayuthapani
              richardhills Richard Hills
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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