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

EXCHANGE PARTITION does not work for tables with unique blobs

Details

    Description

      Filing as minor, because given MDEV-25654 other problems, it's probably for the better that at least EXCHANGE PARTITION refuses to work on tables with unique blobs; but still, I suppose it should be filed for the brighter future when unique blobs become viable.

      --source include/have_partition.inc
       
      CREATE TABLE t (a INT, b TEXT, UNIQUE (b)) PARTITION BY LIST (a) (PARTITION p0 VALUES IN (1,2), PARTITION pdef DEFAULT);
      CREATE TABLE tp (a INT, b TEXT, UNIQUE (b));
      ALTER TABLE t EXCHANGE PARTITION p0 WITH TABLE tp;
       
      # Cleanup
      DROP TABLE t, tp;
      

      10.5 bf7cfa2535618bfe9962c725555680e799fdcd18

      CREATE TABLE t (a INT, b TEXT, UNIQUE (b)) PARTITION BY LIST (a) (PARTITION p0 VALUES IN (1,2), PARTITION pdef DEFAULT);
      CREATE TABLE tp (a INT, b TEXT, UNIQUE (b));
      ALTER TABLE t EXCHANGE PARTITION p0 WITH TABLE tp;
      bug.t                                    [ fail ]
              Test ended at 2024-12-10 13:34:50
       
      CURRENT_TEST: bug.t
      mysqltest: At line 5: query 'ALTER TABLE t EXCHANGE PARTITION p0 WITH TABLE tp' failed: 1736: Tables have different definitions
      

      Attachments

        Issue Links

          Activity

            Same as MDEV-34033?

            serg Sergei Golubchik added a comment - Same as MDEV-34033 ?
            elenst Elena Stepanova added a comment - - edited

            I'd expect so, but the patch https://github.com/MariaDB/server/commit/46e40bb5ffc5b2a5c2d4e5aa7e64686adf9c86ff from MDEV-34033 doesn't fix it:

            show variables like '%revision%';
            Variable_name	Value
            version_source_revision	46e40bb5ffc5b2a5c2d4e5aa7e64686adf9c86ff
            CREATE TABLE t (a INT, b TEXT, UNIQUE (b)) PARTITION BY LIST (a) (PARTITION p0 VALUES IN (1,2), PARTITION pdef DEFAULT);
            CREATE TABLE tp (a INT, b TEXT, UNIQUE (b));
            ALTER TABLE t EXCHANGE PARTITION p0 WITH TABLE tp;
            bug.t                                    [ fail ]
                    Test ended at 2024-12-10 13:35:13
             
            CURRENT_TEST: bug.t
            mysqltest: At line 7: query 'ALTER TABLE t EXCHANGE PARTITION p0 WITH TABLE tp' failed: 1736: Tables have different definitions
            

            elenst Elena Stepanova added a comment - - edited I'd expect so, but the patch https://github.com/MariaDB/server/commit/46e40bb5ffc5b2a5c2d4e5aa7e64686adf9c86ff from MDEV-34033 doesn't fix it: show variables like '%revision%' ; Variable_name Value version_source_revision 46e40bb5ffc5b2a5c2d4e5aa7e64686adf9c86ff CREATE TABLE t (a INT , b TEXT, UNIQUE (b)) PARTITION BY LIST (a) (PARTITION p0 VALUES IN (1,2), PARTITION pdef DEFAULT ); CREATE TABLE tp (a INT , b TEXT, UNIQUE (b)); ALTER TABLE t EXCHANGE PARTITION p0 WITH TABLE tp; bug.t [ fail ] Test ended at 2024-12-10 13:35:13   CURRENT_TEST: bug.t mysqltest: At line 7: query 'ALTER TABLE t EXCHANGE PARTITION p0 WITH TABLE tp' failed: 1736: Tables have different definitions

            This is different bug in EXCHANGE PARTITION check.

            midenok Aleksey Midenkov added a comment - This is different bug in EXCHANGE PARTITION check.

            Please review bb-10.5-midenok2

            midenok Aleksey Midenkov added a comment - Please review bb-10.5-midenok2

            commit eb70bdf00 is ok to push, thank you

            nikitamalyavin Nikita Malyavin added a comment - commit eb70bdf00 is ok to push, thank you

            People

              midenok Aleksey Midenkov
              elenst Elena Stepanova
              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.