MySQL 8.0.46 ベースに見ていく。
まずは俺の好きな sql/sql_yacc.yy からダイブ。 CHECK TABLE の定義はこのへん。
9627 check_table_stmt:
9628 CHECK_SYM table_or_tables table_list opt_mi_check_types
9629 {
9630 $$= NEW_PTN PT_check_table_stmt(YYMEM_ROOT, $3,
9631 $4.flags, $4.sql_flags);
9632 }
9633 ;
9634
9635 opt_mi_check_types:
9636 %empty { $$.flags = T_MEDIUM; $$.sql_flags= 0; }
9637 | mi_check_types
9638 ;
9639
9640 mi_check_types:
9641 mi_check_type
9642 | mi_check_type mi_check_types
9643 {
9644 $$.flags= $1.flags | $2.flags;
9645 $$.sql_flags= …[さらに読む]