query_init: SET AUTOCOMMIT=OFF ; START TRANSACTION; query: START TRANSACTION ; update ; update ; ROLLBACK | START TRANSACTION ; delete ; ROLLBACK ; update: int_update | char_update ; int_update: UPDATE _table[invariant] SET `col_int_key` = _digit[invariant] WHERE where_list ORDER BY order_by_clause optional_limit ; int_count ; int_count: SELECT COUNT(*) FROM _table[invariant] WHERE `col_int_key` = _digit[invariant] ; char_update: UPDATE _table[invariant] SET `col_varchar_10_key` = _char[invariant] WHERE where_list ORDER BY order_by_clause optional_limit ; char_count ; char_count: SELECT COUNT(*) FROM _table[invariant] WHERE `col_varchar_10_key` = _char[invariant] ; delete: int_delete | char_delete; int_delete: DELETE FROM _table[invariant] WHERE `col_int_key` = _digit[invariant] AND where_list ORDER BY order_by_clause optional_limit ; int_count ; char_delete: DELETE FROM _table[invariant] WHERE `col_varchar_10_key` = _char[invariant] AND where_list ORDER BY order_by_clause optional_limit ; char_count ; where_list: where_item | where_item | where_item | where_list and_or where_item ; where_item: int_indexed greater_than _digit[invariant] AND int_indexed less_than ( _digit[invariant] + increment ) | int_indexed greater_than _digit[invariant] AND int_indexed less_than ( _digit[invariant] + increment ) | int_indexed greater_than _digit AND int_indexed less_than ( _digit[invariant] + int_value ) | int_indexed greater_than _digit[invariant] AND int_indexed less_than ( _digit + int_value ) | int_indexed greater_than _digit AND int_indexed less_than ( _digit + increment ) | int_indexed comparison_operator int_value | int_indexed not_equal int_value | int_indexed not IN (number_list) | int_indexed not BETWEEN _digit[invariant] AND (_digit[invariant] + int_value ) | int_indexed IS not NULL | char_indexed greater_than _char AND char_indexed less_than 'z' | char_indexed greater_than _char AND char_indexed less_than 'z' | char_indexed greater_than _char AND char_indexed less_than 'z' | char_indexed greater_than char_value AND char_indexed less_than char_value | char_indexed greater_than char_value AND char_indexed less_than 'zzzz' | char_indexed IS not NULL | char_indexed not IN (char_list) | char_indexed not LIKE ( char_pattern ) | char_indexed not BETWEEN _char AND 'z' ; order_by_clause: `pk` asc_desc | `pk` asc_desc | index_column asc_desc , `pk` asc_desc ; asc_desc: DESC | DESC | ASC ; # helper rules: int_indexed: `col_int_key` ; char_indexed: `col_varchar_10_key`; index_column: int_indexed | char_indexed ; increment: small_int_value | 4 | 5 ; small_int_value: 1 | 1 | 1 | 2 | 2 | 2 | 3 | 3 | 3 ; int_value: small_int_value | _digit | _digit | _digit | 10 | 20 ; _digit: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 ; char_value: _char | _char | _char | _quid | _english ; char_pattern: char_value | char_value | CONCAT( _char, '%') | 'a%'| _quid | '_' | '_%' ; comparison_operator: = | > | < | != | <> | <= | >= ; greater_than: > | >= ; less_than: < | <= ; not_equal: <> | != ; and_or: AND | AND | AND | OR ; not: | | NOT ; number_list: int_value | number_list, int_value ; char_list: _char | char_list, _char ; optional_limit: | LIMIT _digit | LIMIT _digit | LIMIT _tinyint_unsigned ;