Repository navigation
feat: parse MySQL CHECKSUM TABLE and histogram update options - #2883
Merged
manticore-projects merged 1 commit intoOct 31, 2026
Merged
manticore-projects merged 1 commit into
manticore-projects merged 1 commit into
Conversation
CHECKSUM TABLE failed, and so did the MySQL 8.4 forms of ANALYZE TABLE ... UPDATE HISTOGRAM that end in AUTO UPDATE or MANUAL UPDATE or that give the histogram with USING DATA. CHECKSUM TABLE is a TableMaintenanceStatement with the new operation CHECKSUM, which takes no modifier and one of QUICK and EXTENDED. CHECKSUM becomes a non-reserved keyword, so it remains usable as a name and as a table option. Analyze keeps the update mode in getHistogramUpdateMode() and the JSON in getHistogramData(); USING DATA excludes the bucket count and the update mode, and DROP HISTOGRAM takes none of them. Signed-off-by: minleejae <mmj9808@gmail.com>
Contributor
|
Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CHECKSUM TABLEfailed, and so did the MySQL 8.4 forms ofANALYZE TABLE … UPDATE HISTOGRAMthat end inAUTO UPDATEorMANUAL UPDATEor that give the histogram withUSING DATA 'json'.CHECK,OPTIMIZEandREPAIR TABLE(#2788) and the other histogram forms (#2542) already parsed.CHECKSUM TABLE t1, t2 [QUICK | EXTENDED]is aTableMaintenanceStatementwith the new operationCHECKSUM. Like the other operations, it accepts only its own options: noNO_WRITE_TO_BINLOGorLOCAL, and one ofQUICKandEXTENDED.CHECKSUMbecomes a non-reserved keyword, so it stays usable as a name, as a function name and as theCHECKSUMtable option. Feature analysis reportsREADS_DATAandRETURNS_RESULT_SET, as forCHECK TABLE.Analyzekeeps the update mode ingetHistogramUpdateMode()(AUTOorMANUAL) and the JSON ingetHistogramData(), aStringValue.USING DATAexcludes the bucket count and the update mode, andDROP HISTOGRAMtakes none of them, as in MySQL.Public method signatures are retained.
TableMaintenanceStatement.OperationgainsCHECKSUM.Syntax reference: MySQL 8.4 CHECKSUM TABLE, ANALYZE TABLE.
Validation:
TableMaintenanceStatementTestadds 4CHECKSUM TABLEstatements, checked with and without the MySQL and MariaDB dialects, plus 6 rejected forms,CHECKSUMas a column, table and function name and as a table option, and the reported features.AnalyzeTestadds 3 histogram statements, a built statement and 6 rejected forms.TableMaintenanceValidatorTestcoversCHECKSUM TABLE. All 7 statements fail on masterdd03d6ff1.information_schema.COLUMN_STATISTICSand given back withUSING DATAis accepted by MySQL and round-trips through the parser.check: 12,341 tests, 0 failures, 25 skipped. Grammar ambiguity, formatting (Spotless ratchet againstupstream/master), Checkstyle, PMD, SpotBugs and JaCoCo pass.AI assistance: prepared with Claude Code.