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

Provide checksum aggregate functions, and partition-level checksums

Details

    • Task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • Server
    • None

    Description

      Today, we only have the option to checksum a table:

      CHECKSUM TABLE tbl_name [, tbl_name] ... [ QUICK | EXTENDED ]

      However, it would be useful to be able to specify a subset of data, especially a single partition.

      Additionally, it would be best if it would be possible to get a checksum of data in an un-partitioned table, then copy this data into a partitioned table, aggregate the checksum values of each partition, and get the same value as un-partitioned table.

      ( Relates to: MDEV-16249 )

      Attachments

        Issue Links

          Activity

            Eric_Herman Eric Herman added a comment - - edited

            I can imagine a new syntax something like extending the MD5 aggregate functions to take multiple columns might be useful.

            I can imagine adding syntax like

            CHECKSUM TABLE tbl_name [PARTITION BY partition_options] [, tbl_name ]

            might be useful for non-partitioned tables, as it would allow for parallel checksum calculation, even in the non-partitioned case.

            Already there exists some partition CHECKSUM data in information_schema. https://mariadb.com/kb/en/library/information-schema-partitions-table/

            Eric_Herman Eric Herman added a comment - - edited I can imagine a new syntax something like extending the MD5 aggregate functions to take multiple columns might be useful. I can imagine adding syntax like CHECKSUM TABLE tbl_name [PARTITION BY partition_options] [, tbl_name ] might be useful for non-partitioned tables, as it would allow for parallel checksum calculation, even in the non-partitioned case. Already there exists some partition CHECKSUM data in information_schema. https://mariadb.com/kb/en/library/information-schema-partitions-table/

            There's already a syntax for a table partition, like (copied from tests):

            SELECT * FROM t2 PARTITION (foo);
            DELETE t1, t2 FROM t1 PARTITION (pNeg), t3, t2 PARTITION (p1)
            INSERT INTO t2 PARTITION (subp3) SELECT ...
            

            So syntax-wise it would be quite logical to use that for CHECKSUM TABLE.

            serg Sergei Golubchik added a comment - There's already a syntax for a table partition, like (copied from tests): SELECT * FROM t2 PARTITION (foo); DELETE t1, t2 FROM t1 PARTITION (pNeg), t3, t2 PARTITION (p1) INSERT INTO t2 PARTITION (subp3) SELECT ... So syntax-wise it would be quite logical to use that for CHECKSUM TABLE .

            People

              Unassigned Unassigned
              Eric_Herman Eric Herman
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.