DBZ-4887 Allow ANALYZE TABLES statement in MySQL grammar

This commit is contained in:
Vojtech Juranek 2022-03-21 16:08:49 +01:00 committed by Jiri Pechanec
parent fdfc7a6647
commit 81f11f6646
2 changed files with 2 additions and 1 deletions

View File

@ -1666,7 +1666,7 @@ renameUserClause
analyzeTable analyzeTable
: ANALYZE actionOption=(NO_WRITE_TO_BINLOG | LOCAL)? : ANALYZE actionOption=(NO_WRITE_TO_BINLOG | LOCAL)?
TABLE tables (TABLE | TABLES) tables
( UPDATE HISTOGRAM ON fullColumnName (',' fullColumnName)* (WITH decimalLiteral BUCKETS)? )? ( UPDATE HISTOGRAM ON fullColumnName (',' fullColumnName)* (WITH decimalLiteral BUCKETS)? )?
( DROP HISTOGRAM ON fullColumnName (',' fullColumnName)* )? ( DROP HISTOGRAM ON fullColumnName (',' fullColumnName)* )?
; ;

View File

@ -1,6 +1,7 @@
#begin #begin
ANALYZE TABLE t1; ANALYZE TABLE t1;
ANALYZE TABLE t2, t3; ANALYZE TABLE t2, t3;
ANALYZE TABLES t2, t3;
ANALYZE TABLE t1 UPDATE HISTOGRAM ON c1, c2; ANALYZE TABLE t1 UPDATE HISTOGRAM ON c1, c2;
ANALYZE TABLE t2 UPDATE HISTOGRAM ON c1 WITH 2 BUCKETS; ANALYZE TABLE t2 UPDATE HISTOGRAM ON c1 WITH 2 BUCKETS;
ANALYZE TABLE t2 DROP HISTOGRAM ON c1; ANALYZE TABLE t2 DROP HISTOGRAM ON c1;