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

Server crash when creating an index after adding a foreign key

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Incomplete
    • 10.7.3
    • N/A
    • None
    • docker desktop on windows

    Description

      When using a newly created database, executing the following sql statements will cause a server crash.

      create table player_profiles (
        id                            varchar(40) not null,
        name                          varchar(255) not null,
        tokens                        integer default 0 not null,
        constraint pk_player_profiles primary key (id)
      );
       
      create table player_report (
        id                            varchar(40) not null,
        sender_player_id              varchar(40) not null,
        target_player_id              varchar(40) not null,
        created_at                    datetime(6) not null,
        constraint pk_player_report primary key (id)
      );
       
      create index ix_player_report_sender_player_id on player_report (sender_player_id);
       
      -- the next line adds a foreign key, removing this line will prevent a server crash
      alter table player_report add constraint fk_player_report_sender_player_id foreign key (sender_player_id) references player_profiles (id) on delete restrict on update restrict;
       
      -- server crashes on this query
      create index ix_player_report_target_player_id on player_report (target_player_id);
      

      The crash occurs when adding a foreign key, followed by the creation of an index. This happens on the same table but on different columns.

      The docker image was freshly pulled from Docker Hub and run on a Windows 10 computer.

      Attachments

        1. mariadb-crash-1.log
          11 kB
        2. mariadb-1.strace
          2.01 MB
        3. mariadb.strace
          19 kB
        4. Logfile3.PML
          9.42 MB
        5. docker-compose.yml
          0.4 kB

        Issue Links

          Activity

            People

              danblack Daniel Black
              jorisguffens Joris Guffens
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.