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

#mysql50# mixes up with table names in the table cache and on disk

    XMLWordPrintable

Details

    • Can result in hang or crash
    • Q3/2026 Server Maintenance

    Description

      CREATE TABLE `t`(id INT, c1 BINARY(10)) ENGINE=MEMORY;
      INSERT INTO `t` VALUES(1, REPEAT(0x41,10));
      SELECT id, HEX(c1) FROM `t`;
      DROP TABLE IF EXISTS `#mysql50#t`;
      CREATE TABLE `#mysql50#t`(id INT, c1 BINARY(1)) ENGINE=MEMORY;
      INSERT INTO `#mysql50#t` VALUES(2, 0x42);
      SELECT id, HEX(c1) FROM `#mysql50#t` WHERE id=2;
      SELECT id, HEX(c1) FROM `t` ORDER BY id;
      DROP TABLE IF EXISTS `t`, `#mysql50#t`;
      

      the last SELECT prints

      SELECT id, HEX(c1) FROM `t` ORDER BY id;
      id      HEX(c1)
      1       41414141414141414141
      2       42A5A5A5A5A5A5A5A5A5
      

      see how INSERT INTO `#mysql50#t` VALUES(2, 0x42) shows up in SELECT .. FROM t

      Reported by Ben Bidner (Automattic.com Security Team).

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              serg Sergei Golubchik
              Alexander Barkov Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0d
                  0d
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 3h
                  3h

                  Git Integration

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