Commit Graph

123 Commits

Author SHA1 Message Date
97941448f4 [parser] issues 280: Support ON UPDATE ddl statements (#331)
* issues 280: Support ON UPDATE ddl statements

* issue 280: add generated file
2021-10-09 14:53:23 +08:00
78f1322d91 [parser] charset: add 'char set' syntax support (#389) 2021-10-09 14:53:23 +08:00
fe06061d94 [parser] Issue 332 support "DROP TEMPORARY table" (#333)
* issue 332: add support for 'drop temporary table'

* issue 332: add generated file
2021-10-09 14:53:23 +08:00
cdb0be24c8 [parser] parser: support DELETE FROM ... AS ... syntax (#383) 2021-10-09 14:53:23 +08:00
150d5b92b1 [parser] parser: add opt_rule_blacklist and admin reload it. (#375) 2021-10-09 14:53:23 +08:00
6c5f75832e [parser] parser: support "admin plugins enable/disable plugin1" syntax (#374) 2021-10-09 14:53:23 +08:00
958cd88343 [parser] add hexLit and binaryList support for LOAD DATA (#365)
* support hex and bin for terminator

* add more tests

* add test for binary

* adddress comment

* add ast.BinaryLiteral

* go fmt project

* address comment

* fix parser

* update gomod
2021-10-09 14:53:23 +08:00
2d9b2efb42 [parser] *: add show table regions syntax (#349)
'SHOW TABLE table_name [INDEX] [index_name] REGIONS'
2021-10-09 14:53:23 +08:00
84d13adf9e [parser] parser: fix hint parsing in select /*+ max_execution_time */ 1 (#366) 2021-10-09 14:53:23 +08:00
ac2366a98e [parser] *: add admin cleanup table lock syntax (#323) 2021-10-09 14:53:23 +08:00
cf64b220fe [parser] *: add IF EXISTS and IF NOT EXISTS supported for MariaDB (#337) 2021-10-09 14:53:23 +08:00
08ef2cc316 [parser] *: support syntax for 'admin reload expr_pushdown_blacklist' (#350) 2021-10-09 14:53:23 +08:00
92ba8bb89b [parser] *: support parsing all PARTITION BY syntax (#345) 2021-10-09 14:53:23 +08:00
4dbad06ee8 [parser] *: try to support lock/unlock tables function (#305) 2021-10-09 14:53:23 +08:00
02468bfa24 [parser] add split table ... between ... and syntax (#321) 2021-10-09 14:53:23 +08:00
c3f5479d6b [parser] Fix handling of FLOAT(p), FLOAT(m,d) and DECIMAL(m,0) types esp. w.r.t. Restore() (#311)
* parser: fix handling of FLOAT(p) and FLOAT(m,d) types

* FLOAT(50,4) should not automatically become a DOUBLE, it is just a FLOAT
  shown with 50 digits.
* FLOAT(0) and FLOAT(24) are the alias of the same type FLOAT. There is no
  need to record the Flen.

* types: fix Restore of DECIMAL(m,0) types

* tests: add test cases
2021-10-09 14:53:23 +08:00
e34b3821d9 [parser] add MySQL extension assignment support for VariableAssignment (#346) 2021-10-09 14:53:23 +08:00
e8b48ae881 [parser] Parser: Support SQL_BIG_RESULT, SQL_SMALL_RESULT, SQL_BUFFER_RESULT (#304)
* Support SQL_BIG_RESULT, SQL_SMALL_RESULT, SQL_BUFFER_RESULT

* update test case

* code formatting

* word wrap
2021-10-09 14:53:23 +08:00
6a484a4614 [parser] support keyword OPTIMISTIC and PESSIMISTIC. (#335) 2021-10-09 14:53:23 +08:00
68880d0153 [parser] Support load data ignore replace (#312) 2021-10-09 14:53:23 +08:00
2fa7c9076b [parser] parser: support mysql-compatible explain format (#316) 2021-10-09 14:53:23 +08:00
78d1b7f21b [parser] parser: add support for ALTER DATABASE syntax (#318) 2021-10-09 14:53:23 +08:00
7c9cd7df82 [parser] *: Add split index region syntax support. (#297) 2021-10-09 14:53:23 +08:00
e31fda929f [parser] parser: Refine LoadDataStmt (#288)
* Code Refine

* Add multi set test case

* revert test case loss
2021-10-09 14:53:23 +08:00
9a5b162e42 [parser] parser: support SHOW PROFILE syntax (#298) 2021-10-09 14:53:23 +08:00
1fa4d04572 [parser] *: fix upper-cased charset and collation name (#301) 2021-10-09 14:53:23 +08:00
bec06d97d6 [parser] Add begin lock syntax for pessimistic transaction. (#307) 2021-10-09 14:53:23 +08:00
b69ad00c7c [parser] parser: check invalid column define option for generated columns (#201)
* parser: add check on column options

* add related tests

* add more tests

* fix ident problems

* fix bug

* Code refine according to reviewer's opinion
2021-10-09 14:53:23 +08:00
e01e5a2636 [parser] parser: support show analyze status (#292) 2021-10-09 14:53:23 +08:00
a7d5fa8f30 [parser] parser: support incremental analyze (#282) 2021-10-09 14:53:23 +08:00
754e089e3f [parser] parser: fix now frac in column option (#214) 2021-10-09 14:53:23 +08:00
568898c8d7 [parser] type/compatibility: fix show create table output of generated column (#235) 2021-10-09 14:53:23 +08:00
1636af258f [parser] *: add "show open tables" support (#291) 2021-10-09 14:53:23 +08:00
5ac172fb58 [parser] *: add table option: pre_split_regions (#287)
* *: add table option: pre_split_resions

* refine code

* add PreSplitRegions in tableInfo

* Update misc.go

Co-Authored-By: crazycs520 <crazycs520@gmail.com>

* Update parser.y

Co-Authored-By: crazycs520 <crazycs520@gmail.com>

* address comment

* refine comment
2021-10-09 14:53:23 +08:00
146b505eef [parser] ast: add role support show grant (#272)
* add option for show grant

* fix tab

* address comment
2021-10-09 14:53:23 +08:00
3417bf3834 [parser] parser: complete Restore for CreateUserStmt (#275) 2021-10-09 14:53:23 +08:00
91319f3063 [parser] parser: refine error messages that are inconsistent with MySQL (#273) 2021-10-09 14:53:23 +08:00
9ca175b8c3 [parser] parser: fix load data syntax (#274) 2021-10-09 14:53:23 +08:00
0b845b621c [parser] ast: add set default role (#266) 2021-10-09 14:53:23 +08:00
6bfe81dce2 [parser] change admin restore table syntax to recover table syntax. (#180) 2021-10-09 14:53:23 +08:00
89bfa28bae [parser] add revoke role (#245) 2021-10-09 14:53:23 +08:00
12d1a3354c [parser] ast: support EXPLAIN FOR CONNECTION (#271) 2021-10-09 14:53:23 +08:00
b5a1ee3a2f [parser] parser, ast: add ColumnOptionCollate for all column types (#260) 2021-10-09 14:53:23 +08:00
e9db4f1358 [parser] Parser: Support CREATE USER extensions per MySQL 5.7 (#269) 2021-10-09 14:53:23 +08:00
2a2f211cc5 [parser] parser: fix error message for illegal year type definition. (#268) 2021-10-09 14:53:23 +08:00
c938f62ea5 [parser] parser: add charset validation (TiDB #4436) (#220)
* Add charset validation in pattern `CharsetName`, and use it in syntax `CONVERT(expr USING transcoding_name)` and `CHAR(N USING charset_name)`.
* Modify `yyLexer` interface to return different types of error.
2021-10-09 14:53:23 +08:00
97c4bafa13 [parser] parser: treat node_id and node_stats as tidb keyword (#263) 2021-10-09 14:53:23 +08:00
389ede704f [parser] ast: add GrantRoleStmt to support GRANT ROLE (#242) 2021-10-09 14:53:23 +08:00
bee7de1fb7 [parser] parser, ast: add SET ROLE support (#228) 2021-10-09 14:53:23 +08:00
cb5c8effc3 [parser] *: parser subpartition option for 'partition by range columns' (#233) 2021-10-09 14:53:23 +08:00