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

WITHOUT VALIDATION for EXCHANGE PARTITION/CONVERT IN

Details

    Description

      Goal

      Add support for WITH VALIDATION | WITHOUT VALIDATION to
      ALTER TABLE ... EXCHANGE PARTITION ... WITH TABLE

      WITH VALIDATION should be the default behavior.

      Must also cover CONVERT {TABLE|PARTITION} TO

      Background

      When WITHOUT VALIDATION is specified, there is no check that all rows in the added table fulfills the partition restrictions. If there is inconsistencies, it will result in rows later not being found in SELECT, UPDATE or DELETE.

      MySQL has had this since 5.7.5 and it's important when adding big tables to a partitioned table to avoid the expensive row-by-row check.

      h3. Supplemental feature

      Make THAN keyword optional in partition definition of range partitioning.

      Attachments

        Issue Links

          Activity

            monty Michael Widenius created issue -
            monty Michael Widenius made changes -
            Field Original Value New Value
            monty Michael Widenius made changes -
            Description Add support for WITH VALIDATE | WITHOUT VALIDATE to
            ALTER TABLE ... EXCHANGE PARTITION ... WITH TABLE
            MySQL has had this since 5.7.5 and it's important when adding big tables to a partitioned table.

            When WITHOUT VALIDATION is specified, there is no check that all rows in the added table fulfills the partition restrictions. If there is inconsistencies, it will result in rows later not being found in SELECT, UPDATE or DELETE.

            WITH VALIDATION should be the default behavior.
            Add support for WITH VALIDATE | WITHOUT VALIDATE to
            ALTER TABLE ... EXCHANGE PARTITION ... WITH TABLE
            MySQL has had this since 5.7.5 and it's important when adding big tables to a partitioned table to avoid the expensive row-by-row check.

            When WITHOUT VALIDATION is specified, there is no check that all rows in the added table fulfills the partition restrictions. If there is inconsistencies, it will result in rows later not being found in SELECT, UPDATE or DELETE.

            WITH VALIDATION should be the default behavior.
            serg Sergei Golubchik made changes -
            Assignee Alexey Botchkov [ holyfoot ]
            serg Sergei Golubchik made changes -
            Labels Compatibility
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 10.6 [ 24028 ]
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 10.5 [ 23123 ]
            serg Sergei Golubchik made changes -
            Rank Ranked lower
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.6 [ 24028 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Assignee Alexey Botchkov [ holyfoot ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.7 [ 24805 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.8 [ 26121 ]
            Fix Version/s 10.7 [ 24805 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 106790 ] MariaDB v4 [ 131251 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.9 [ 26905 ]
            Fix Version/s 10.8 [ 26121 ]
            julien.fritsch Julien Fritsch made changes -
            Description Add support for WITH VALIDATE | WITHOUT VALIDATE to
            ALTER TABLE ... EXCHANGE PARTITION ... WITH TABLE
            MySQL has had this since 5.7.5 and it's important when adding big tables to a partitioned table to avoid the expensive row-by-row check.

            When WITHOUT VALIDATION is specified, there is no check that all rows in the added table fulfills the partition restrictions. If there is inconsistencies, it will result in rows later not being found in SELECT, UPDATE or DELETE.

            WITH VALIDATION should be the default behavior.
            Add support for WITH VALIDATE \| WITHOUT VALIDATE to
            ALTER TABLE ... EXCHANGE PARTITION ... WITH TABLE
            MySQL has had this since 5.7.5 and it's important when adding big tables to a partitioned table to avoid the expensive row-by-row check.

            When WITHOUT VALIDATION is specified, there is no check that all rows in the added table fulfills the partition restrictions. If there is inconsistencies, it will result in rows later not being found in SELECT, UPDATE or DELETE.

            WITH VALIDATION should be the default behavior.
            julien.fritsch Julien Fritsch made changes -
            Description Add support for WITH VALIDATE \| WITHOUT VALIDATE to
            ALTER TABLE ... EXCHANGE PARTITION ... WITH TABLE
            MySQL has had this since 5.7.5 and it's important when adding big tables to a partitioned table to avoid the expensive row-by-row check.

            When WITHOUT VALIDATION is specified, there is no check that all rows in the added table fulfills the partition restrictions. If there is inconsistencies, it will result in rows later not being found in SELECT, UPDATE or DELETE.

            WITH VALIDATION should be the default behavior.
            Add support for WITH VALIDATE | WITHOUT VALIDATE to
            ALTER TABLE ... EXCHANGE PARTITION ... WITH TABLE
            MySQL has had this since 5.7.5 and it's important when adding big tables to a partitioned table to avoid the expensive row-by-row check.

            When WITHOUT VALIDATION is specified, there is no check that all rows in the added table fulfills the partition restrictions. If there is inconsistencies, it will result in rows later not being found in SELECT, UPDATE or DELETE.

            WITH VALIDATION should be the default behavior.
            ralf.gebhardt Ralf Gebhardt made changes -
            Assignee Max Mether [ maxmether ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.9 [ 26905 ]
            maxmether Max Mether made changes -
            AirFocus AirFocus made changes -
            Description Add support for WITH VALIDATE | WITHOUT VALIDATE to
            ALTER TABLE ... EXCHANGE PARTITION ... WITH TABLE
            MySQL has had this since 5.7.5 and it's important when adding big tables to a partitioned table to avoid the expensive row-by-row check.

            When WITHOUT VALIDATION is specified, there is no check that all rows in the added table fulfills the partition restrictions. If there is inconsistencies, it will result in rows later not being found in SELECT, UPDATE or DELETE.

            WITH VALIDATION should be the default behavior.
            Add support for WITH VALIDATE \| WITHOUT VALIDATE to
            ALTER TABLE ... EXCHANGE PARTITION ... WITH TABLE
            MySQL has had this since 5.7.5 and it's important when adding big tables to a partitioned table to avoid the expensive row-by-row check.

            When WITHOUT VALIDATION is specified, there is no check that all rows in the added table fulfills the partition restrictions. If there is inconsistencies, it will result in rows later not being found in SELECT, UPDATE or DELETE.

            WITH VALIDATION should be the default behavior.
            julien.fritsch Julien Fritsch made changes -
            Assignee Max Mether [ maxmether ] Ralf Gebhardt [ ralf.gebhardt@mariadb.com ]
            midenok Aleksey Midenkov made changes -
            midenok Aleksey Midenkov made changes -
            Colin Qin Luo Colin Luo added a comment -

            Just following up if there is any update on making “WITHOUT VALIDATION“ option available for exchange partitions.

            It will be nice to have that option because we are using partition exchange functionality for deploying large amount of data in the production environment.

            Thanks a ton!

            Colin Qin Luo Colin Luo added a comment - Just following up if there is any update on making “WITHOUT VALIDATION“ option available for exchange partitions. It will be nice to have that option because we are using partition exchange functionality for deploying large amount of data in the production environment. Thanks a ton!
            serg Sergei Golubchik made changes -
            Description Add support for WITH VALIDATE \| WITHOUT VALIDATE to
            ALTER TABLE ... EXCHANGE PARTITION ... WITH TABLE
            MySQL has had this since 5.7.5 and it's important when adding big tables to a partitioned table to avoid the expensive row-by-row check.

            When WITHOUT VALIDATION is specified, there is no check that all rows in the added table fulfills the partition restrictions. If there is inconsistencies, it will result in rows later not being found in SELECT, UPDATE or DELETE.

            WITH VALIDATION should be the default behavior.
            Add support for WITH VALIDATE \| WITHOUT VALIDATE to
            ALTER TABLE ... EXCHANGE PARTITION ... WITH TABLE
            MySQL has had this since 5.7.5 and it's important when adding big tables to a partitioned table to avoid the expensive row-by-row check.

            When WITHOUT VALIDATION is specified, there is no check that all rows in the added table fulfills the partition restrictions. If there is inconsistencies, it will result in rows later not being found in SELECT, UPDATE or DELETE.

            WITH VALIDATION should be the default behavior.

            Should also cover {{CONVERT \{TABLE|PARTITION} TO}}
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            Assignee Ralf Gebhardt [ ralf.gebhardt@mariadb.com ] Aleksey Midenkov [ midenok ]
            serg Sergei Golubchik made changes -
            Fix Version/s 11.4 [ 29301 ]
            serg Sergei Golubchik made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            midenok Aleksey Midenkov made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            midenok Aleksey Midenkov made changes -
            Summary Adding support for WITH_VALIDATE to ALTER TABLE EXCHANGE PARTITION WITHOUT CHECK for EXCHANGE PARTITION/CONVERT IN
            midenok Aleksey Midenkov made changes -
            Description Add support for WITH VALIDATE \| WITHOUT VALIDATE to
            ALTER TABLE ... EXCHANGE PARTITION ... WITH TABLE
            MySQL has had this since 5.7.5 and it's important when adding big tables to a partitioned table to avoid the expensive row-by-row check.

            When WITHOUT VALIDATION is specified, there is no check that all rows in the added table fulfills the partition restrictions. If there is inconsistencies, it will result in rows later not being found in SELECT, UPDATE or DELETE.

            WITH VALIDATION should be the default behavior.

            Should also cover {{CONVERT \{TABLE|PARTITION} TO}}
            Add support for WITH VALIDATION \| WITHOUT VALIDATION to
            ALTER TABLE ... EXCHANGE PARTITION ... WITH TABLE

            MySQL has [had this|https://dev.mysql.com/doc/refman/8.0/en/partitioning-management-exchange.html] since 5.7.5 and it's important when adding big tables to a partitioned table to avoid the expensive row-by-row check.

            When WITHOUT VALIDATION is specified, there is no check that all rows in the added table fulfills the partition restrictions. If there is inconsistencies, it will result in rows later not being found in SELECT, UPDATE or DELETE.

            WITH VALIDATION should be the default behavior.

            Should also cover {{CONVERT \{TABLE|PARTITION} TO}}
            midenok Aleksey Midenkov made changes -
            Summary WITHOUT CHECK for EXCHANGE PARTITION/CONVERT IN WITHOUT VALIDATION for EXCHANGE PARTITION/CONVERT IN

            Please review bb-11-midenok

            midenok Aleksey Midenkov added a comment - Please review bb-11-midenok
            midenok Aleksey Midenkov made changes -
            Assignee Aleksey Midenkov [ midenok ] Oleksandr Byelkin [ sanja ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            midenok Aleksey Midenkov made changes -
            Description Add support for WITH VALIDATION \| WITHOUT VALIDATION to
            ALTER TABLE ... EXCHANGE PARTITION ... WITH TABLE

            MySQL has [had this|https://dev.mysql.com/doc/refman/8.0/en/partitioning-management-exchange.html] since 5.7.5 and it's important when adding big tables to a partitioned table to avoid the expensive row-by-row check.

            When WITHOUT VALIDATION is specified, there is no check that all rows in the added table fulfills the partition restrictions. If there is inconsistencies, it will result in rows later not being found in SELECT, UPDATE or DELETE.

            WITH VALIDATION should be the default behavior.

            Should also cover {{CONVERT \{TABLE|PARTITION} TO}}
            h3. Goal
            Add support for WITH VALIDATION \| WITHOUT VALIDATION to
            ALTER TABLE ... EXCHANGE PARTITION ... WITH TABLE

            WITH VALIDATION should be the default behavior.

            Must also cover {{CONVERT \{TABLE|PARTITION} TO}}

            h3. Background

            When WITHOUT VALIDATION is specified, there is no check that all rows in the added table fulfills the partition restrictions. If there is inconsistencies, it will result in rows later not being found in SELECT, UPDATE or DELETE.

            MySQL has [had this|https://dev.mysql.com/doc/refman/8.0/en/partitioning-management-exchange.html] since 5.7.5 and it's important when adding big tables to a partitioned table to avoid the expensive row-by-row check.

            h3. Supplemental feature

            Make THAN keyword optional in partition definition of range partitioning.

            Generally everything looks OK, but :

            1. I am afraid this tree without full version name do not allow to make tests correctly (at least upgrade tests)
            2. Add version end marker after your tests (always should be done if it is absent in the test file and your test is the last one)
            3. IMHO it lack of "strange/error" tests, ad at least partitioning with LIST and hash to the tests
            sanja Oleksandr Byelkin added a comment - Generally everything looks OK, but : I am afraid this tree without full version name do not allow to make tests correctly (at least upgrade tests) Add version end marker after your tests (always should be done if it is absent in the test file and your test is the last one) IMHO it lack of "strange/error" tests, ad at least partitioning with LIST and hash to the tests
            sanja Oleksandr Byelkin made changes -
            Assignee Oleksandr Byelkin [ sanja ] Aleksey Midenkov [ midenok ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            julien.fritsch Julien Fritsch made changes -
            Issue Type Task [ 3 ] New Feature [ 2 ]
            midenok Aleksey Midenkov made changes -
            Status Stalled [ 10000 ] In Progress [ 3 ]
            midenok Aleksey Midenkov made changes -
            Fix Version/s 11.4.1 [ 29523 ]
            Fix Version/s 11.4 [ 29301 ]
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Assignee Aleksey Midenkov [ midenok ] Elena Stepanova [ elenst ]
            Resolution Fixed [ 1 ]
            Status Closed [ 6 ] Stalled [ 10000 ]
            serg Sergei Golubchik made changes -
            Status Stalled [ 10000 ] In Testing [ 10301 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 11.4 [ 29301 ]
            Fix Version/s 11.4.1 [ 29523 ]

            The "supplemental feature" (making THAN keyword optional) wasn't a part of the original task, isn't required for the functionality, doesn't seem to be a part of any compatibility effort (as far as I can see, MySQL 8.x does not support it), and in general looks more like a typo than a valid expression:

            create table t (a int) partition by range (a) (p0 values less (100));
            

            elenst Elena Stepanova added a comment - The "supplemental feature" (making THAN keyword optional) wasn't a part of the original task, isn't required for the functionality, doesn't seem to be a part of any compatibility effort (as far as I can see, MySQL 8.x does not support it), and in general looks more like a typo than a valid expression: create table t (a int ) partition by range (a) (p0 values less (100));

            Right. midenok, please revert this.

            serg Sergei Golubchik added a comment - Right. midenok , please revert this.
            serg Sergei Golubchik made changes -
            Description h3. Goal
            Add support for WITH VALIDATION \| WITHOUT VALIDATION to
            ALTER TABLE ... EXCHANGE PARTITION ... WITH TABLE

            WITH VALIDATION should be the default behavior.

            Must also cover {{CONVERT \{TABLE|PARTITION} TO}}

            h3. Background

            When WITHOUT VALIDATION is specified, there is no check that all rows in the added table fulfills the partition restrictions. If there is inconsistencies, it will result in rows later not being found in SELECT, UPDATE or DELETE.

            MySQL has [had this|https://dev.mysql.com/doc/refman/8.0/en/partitioning-management-exchange.html] since 5.7.5 and it's important when adding big tables to a partitioned table to avoid the expensive row-by-row check.

            h3. Supplemental feature

            Make THAN keyword optional in partition definition of range partitioning.
            h3. Goal
            Add support for WITH VALIDATION \| WITHOUT VALIDATION to
            ALTER TABLE ... EXCHANGE PARTITION ... WITH TABLE

            WITH VALIDATION should be the default behavior.

            Must also cover {{CONVERT \{TABLE|PARTITION} TO}}

            h3. Background

            When WITHOUT VALIDATION is specified, there is no check that all rows in the added table fulfills the partition restrictions. If there is inconsistencies, it will result in rows later not being found in SELECT, UPDATE or DELETE.

            MySQL has [had this|https://dev.mysql.com/doc/refman/8.0/en/partitioning-management-exchange.html] since 5.7.5 and it's important when adding big tables to a partitioned table to avoid the expensive row-by-row check.

            -h3. Supplemental feature-

            -Make THAN keyword optional in partition definition of range partitioning.-

            We need proper documentation for how an admin should handle a corrupt table produced with the use of WITHOUT VALIDATION clause. The MySQL manual is no help here, it claims that it

            can be performed using REPAIR TABLE or ALTER TABLE ... REPAIR PARTITION

            however it is not true (not even for MySQL):

            mysql-8.2.0

            mysql> ALTER TABLE t EXCHANGE PARTITION p WITH TABLE t_exchange WITHOUT VALIDATION;
            Query OK, 0 rows affected (0.44 sec)
             
            mysql> check table t;
            +--------+-------+----------+-----------------------------------------------+
            | Table  | Op    | Msg_type | Msg_text                                      |
            +--------+-------+----------+-----------------------------------------------+
            | test.t | check | error    | Partition p returned error                    |
            | test.t | check | error    | Unknown - internal error 160 during operation |
            +--------+-------+----------+-----------------------------------------------+
            2 rows in set (0.05 sec)
             
            mysql> repair table t;
            +--------+--------+----------+-----------------------------------------------+
            | Table  | Op     | Msg_type | Msg_text                                      |
            +--------+--------+----------+-----------------------------------------------+
            | test.t | repair | error    | Partition p returned error                    |
            | test.t | repair | error    | Unknown - internal error 160 during operation |
            +--------+--------+----------+-----------------------------------------------+
            2 rows in set (0.02 sec)
             
            mysql> alter table t repair partition p;
            +--------+--------+----------+-----------------------------------------------+
            | Table  | Op     | Msg_type | Msg_text                                      |
            +--------+--------+----------+-----------------------------------------------+
            | test.t | repair | error    | Partition p returned error                    |
            | test.t | repair | error    | Unknown - internal error 160 during operation |
            +--------+--------+----------+-----------------------------------------------+
            2 rows in set (0.02 sec)
             
            mysql> check table t;
            +--------+-------+----------+-----------------------------------------------+
            | Table  | Op    | Msg_type | Msg_text                                      |
            +--------+-------+----------+-----------------------------------------------+
            | test.t | check | error    | Partition p returned error                    |
            | test.t | check | error    | Unknown - internal error 160 during operation |
            +--------+-------+----------+-----------------------------------------------+
            2 rows in set (0.04 sec)
            

            Maybe it should be ALTER TABLE .. REBUILD PARTITION, at least it seems to work.

            elenst Elena Stepanova added a comment - We need proper documentation for how an admin should handle a corrupt table produced with the use of WITHOUT VALIDATION clause. The MySQL manual is no help here, it claims that it can be performed using REPAIR TABLE or ALTER TABLE ... REPAIR PARTITION however it is not true (not even for MySQL): mysql-8.2.0 mysql> ALTER TABLE t EXCHANGE PARTITION p WITH TABLE t_exchange WITHOUT VALIDATION; Query OK, 0 rows affected (0.44 sec)   mysql> check table t; + --------+-------+----------+-----------------------------------------------+ | Table | Op | Msg_type | Msg_text | + --------+-------+----------+-----------------------------------------------+ | test.t | check | error | Partition p returned error | | test.t | check | error | Unknown - internal error 160 during operation | + --------+-------+----------+-----------------------------------------------+ 2 rows in set (0.05 sec)   mysql> repair table t; + --------+--------+----------+-----------------------------------------------+ | Table | Op | Msg_type | Msg_text | + --------+--------+----------+-----------------------------------------------+ | test.t | repair | error | Partition p returned error | | test.t | repair | error | Unknown - internal error 160 during operation | + --------+--------+----------+-----------------------------------------------+ 2 rows in set (0.02 sec)   mysql> alter table t repair partition p; + --------+--------+----------+-----------------------------------------------+ | Table | Op | Msg_type | Msg_text | + --------+--------+----------+-----------------------------------------------+ | test.t | repair | error | Partition p returned error | | test.t | repair | error | Unknown - internal error 160 during operation | + --------+--------+----------+-----------------------------------------------+ 2 rows in set (0.02 sec)   mysql> check table t; + --------+-------+----------+-----------------------------------------------+ | Table | Op | Msg_type | Msg_text | + --------+-------+----------+-----------------------------------------------+ | test.t | check | error | Partition p returned error | | test.t | check | error | Unknown - internal error 160 during operation | + --------+-------+----------+-----------------------------------------------+ 2 rows in set (0.04 sec) Maybe it should be ALTER TABLE .. REBUILD PARTITION , at least it seems to work.
            elenst Elena Stepanova added a comment - - edited

            It may be useful to add a status variable Feature_without_validation or something like that counting specifically "without".
            The reason is that it may cause a variety of issues, so when we later investigate an obscure problem reported by a user, it may help to know that it could have been used.

            elenst Elena Stepanova added a comment - - edited It may be useful to add a status variable Feature_without_validation or something like that counting specifically "without". The reason is that it may cause a variety of issues, so when we later investigate an obscure problem reported by a user, it may help to know that it could have been used.
            ralf.gebhardt Ralf Gebhardt added a comment - - edited

            I like the idea of logging operations which can make the database inconsistent, also if SET FOREIGN_KEY_CHECKS=0; is used, but we might get too many variables. Adding a warning to the server log could be a first simple solution, and it would not be just a counter but would include a timestamp. I am not sure about the overhead a new log file would have, which would only include such cases. serg, what do you think?

            ralf.gebhardt Ralf Gebhardt added a comment - - edited I like the idea of logging operations which can make the database inconsistent, also if SET FOREIGN_KEY_CHECKS=0; is used, but we might get too many variables. Adding a warning to the server log could be a first simple solution, and it would not be just a counter but would include a timestamp. I am not sure about the overhead a new log file would have, which would only include such cases. serg , what do you think?
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik added a comment - - edited

            Feature_without_validation is really simple and can likely be done either way. Also we might, perhaps, mark the frm as "tainted", write a special flag there, it's not difficult.

            SET FOREIGN_KEY_CHECKS=0 is a different story. We cannot mark it in the frm, as DMLs don't modify frm. A warning in the server log is simple, sure. It won't show, though, what tables were affected. But there's also a question — set foreign_key_checks=0 can easily violate data consistency, should it be a privileged operation? Same for unique_checks and check_constraint_checks. Either way, this discussion doesn't really belong here.

            serg Sergei Golubchik added a comment - - edited Feature_without_validation is really simple and can likely be done either way. Also we might, perhaps, mark the frm as "tainted", write a special flag there, it's not difficult. SET FOREIGN_KEY_CHECKS=0 is a different story. We cannot mark it in the frm, as DMLs don't modify frm. A warning in the server log is simple, sure. It won't show, though, what tables were affected. But there's also a question — set foreign_key_checks=0 can easily violate data consistency, should it be a privileged operation? Same for unique_checks and check_constraint_checks . Either way, this discussion doesn't really belong here.
            elenst Elena Stepanova made changes -
            ralf.gebhardt Ralf Gebhardt made changes -
            Labels Compatibility Compatibility Preview_11.4
            elenst Elena Stepanova made changes -
            elenst Elena Stepanova made changes -
            ralf.gebhardt Ralf Gebhardt added a comment -

            After some discussion with serg I personally would conclude that:

            • Feature_without_validation would not help much as it would be reset after server restart, but a partition might still be inconsistent
            • A flag in the .frm file could help at least to print a warning when running CHECK TABLE QUICK. But here the question is if a CHECK PARTITION does not anyhow check an inconsistency anyhow
            ralf.gebhardt Ralf Gebhardt added a comment - After some discussion with serg I personally would conclude that: Feature_without_validation would not help much as it would be reset after server restart, but a partition might still be inconsistent A flag in the .frm file could help at least to print a warning when running CHECK TABLE QUICK. But here the question is if a CHECK PARTITION does not anyhow check an inconsistency anyhow

            Feature_x counters are not an ultimate weapon, but it doesn't mean they are useless. As happens quite often, if they don't show anything, it doesn't mean much, but if it does show something, it is useful information.

            1) Production instances aren't typically restarted without a reason, and issues with invalid tables won't necessarily lead to a crash, so it may well be that a problem under investigation originated from the ongoing server session;
            2) Some users/customers do have regular monitoring which records status values, and may be able to provide the snapshot from before the server restarted;
            3) Real-life instances tend to perform a typical repeating workload, so if they performed a without validation operation in the current session, there is a good chance they did it before.

            That said, I'm not going to insist on adding the counter, I just don't understand why not have it, especially if apparently there isn't any realistic plan to have a more reliable diagnostics. After all, Feature_x is quite a standard thing in MariaDB, not any innovation.

            elenst Elena Stepanova added a comment - Feature_x counters are not an ultimate weapon, but it doesn't mean they are useless. As happens quite often, if they don't show anything, it doesn't mean much, but if it does show something, it is useful information. 1) Production instances aren't typically restarted without a reason, and issues with invalid tables won't necessarily lead to a crash, so it may well be that a problem under investigation originated from the ongoing server session; 2) Some users/customers do have regular monitoring which records status values, and may be able to provide the snapshot from before the server restarted; 3) Real-life instances tend to perform a typical repeating workload, so if they performed a without validation operation in the current session, there is a good chance they did it before. That said, I'm not going to insist on adding the counter, I just don't understand why not have it, especially if apparently there isn't any realistic plan to have a more reliable diagnostics. After all, Feature_x is quite a standard thing in MariaDB, not any innovation.
            ralf.gebhardt Ralf Gebhardt added a comment -

            elenst you are definitely right, Feature_x even only as a counter of the used feature still makes sense. And therefor also indicates that partitions should be checked as long as it is >0.

            serg, could the flag you mentioned for the .frm file be used in information_schema.partitions to mark a partition which was not validated?

            ralf.gebhardt Ralf Gebhardt added a comment - elenst you are definitely right, Feature_x even only as a counter of the used feature still makes sense. And therefor also indicates that partitions should be checked as long as it is >0. serg , could the flag you mentioned for the .frm file be used in information_schema.partitions to mark a partition which was not validated?

            yes

            serg Sergei Golubchik added a comment - yes
            elenst Elena Stepanova made changes -
            elenst Elena Stepanova made changes -
            Assignee Elena Stepanova [ elenst ] Sergei Golubchik [ serg ]
            Status In Testing [ 10301 ] Stalled [ 10000 ]
            serg Sergei Golubchik added a comment - - edited

            unfortunately, ALTER TABLE ... EXCHANGE PARTITION does not touch the .frm file, so it cannot add a flag there.
            I'll print a warning in the log

            serg Sergei Golubchik added a comment - - edited unfortunately, ALTER TABLE ... EXCHANGE PARTITION does not touch the .frm file, so it cannot add a flag there. I'll print a warning in the log
            serg Sergei Golubchik made changes -
            Fix Version/s 11.4.1 [ 29523 ]
            Fix Version/s 11.4 [ 29301 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Aleksey Midenkov [ midenok ]
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 192199

            People

              midenok Aleksey Midenkov
              monty Michael Widenius
              Votes:
              4 Vote for this issue
              Watchers:
              14 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.