Commit Graph

1018 Commits

Author SHA1 Message Date
f100bfdd65 [parser] parser: support cast as double (#399) 2021-10-09 14:53:23 +08:00
5924cf2f8c [parser] parser: fix remove partitioning syntax (#396)
* add support for REMOVE PARTITIONING syntax

* remove unused value

* add type for AlterTableSpec

* indent with tab

* indent with tab
2021-10-09 14:53:23 +08:00
f189c0a2bf [parser] parser : add support for octet_length function (#401) 2021-10-09 14:53:23 +08:00
f3a51e433b [parser] parser: fix compatibility for OnDelete,OnUpdate clauses (#393)
* fix

* fix check for ColumnOption

* add test for match

* use array
2021-10-09 14:53:23 +08:00
9132b83cd8 [parser] parser: support more analyze options (#388) 2021-10-09 14:53:23 +08:00
f211af7b0f [parser] parser: add TableOptimizerHint TIDB_HASHAGG and TIDB_STREAMAGG (#394) 2021-10-09 14:53:23 +08:00
63183ae869 [parser] parser: fix compatibility for LOCK ALGORITHM SET DEFAULT and CHECK clauses (#392) 2021-10-09 14:53:23 +08:00
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
f3c3ddbf98 [parser] utils: IsReadOnly returns wrong result when checking SQLs like explain analyze insert ... (#381)
* update IsReadOnly

* add UT

* fixup
2021-10-09 14:53:23 +08:00
173184e18d [parser] test.sh: do not compile tests in parallel (#382) 2021-10-09 14:53:23 +08:00
d2849ffa22 [parser] test: count coverage for all packages when unit testing (#377) 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
29a32c1051 [parser] mysql: add a new state ErrInvalidJSONPathArrayCell (#373) 2021-10-09 14:53:23 +08:00
e292ab6ed5 [parser] model: add LoadData statement flag (#372)
* model: add LoadData statement flag

* Update model/flags.go

Co-Authored-By: Lonng <heng@lonng.org>
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
d2debf2fdf [parser] parse until eof (#367) 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
b720a62b24 [parser] add binary args field to ExecuteStmt (#363) 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
1bf1d8c877 [parser] model: add in union flag (#351)
Signed-off-by: Lonng <heng@lonng.org>
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
e18c1a7731 [parser] ast: add new field in create view stmt (#343) 2021-10-09 14:53:23 +08:00
416bf41862 [parser] mysql: add ErrInvalidJSONPathArrayCell (#240) 2021-10-09 14:53:23 +08:00
9ff76dabcb [parser] Fix several lexer bugs involving special comments (#342)
* lexer: ensure /*! ... */ follow the same SQL mode as original parser
* lexer: forward stmtText() to specialComment parser if exists
* lexer: ensure invalid tokens in optimizer hint won't loop the parser
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
7038c2f560 [parser] add mysql standard error code 1907 (#339) 2021-10-09 14:53:23 +08:00
b68ad8a55e [parser] ast: fix case expression format bug (#338) 2021-10-09 14:53:23 +08:00
6a484a4614 [parser] support keyword OPTIMISTIC and PESSIMISTIC. (#335) 2021-10-09 14:53:23 +08:00
02f2bdc427 [parser] add write conflict error for latch (#334)
Signed-off-by: Shuaipeng Yu <jackysp@gmail.com>
2021-10-09 14:53:23 +08:00
68880d0153 [parser] Support load data ignore replace (#312) 2021-10-09 14:53:23 +08:00
d7ab3d79d4 [parser] errcode.go: Add ErrBadUser (#319) 2021-10-09 14:53:23 +08:00
d62e9e0d5e [parser] update error message of ErrWriteConflict (#329) 2021-10-09 14:53:23 +08:00
bfe813fcb9 [parser] terror: enhance terror FastGen to gen nostack error (#326) 2021-10-09 14:53:23 +08:00
304090faa7 [parser] test: enable coverage when running unit tests (#324)
* test: enable coverage when running unit tests

* README: add codecov badge
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
824bc91f46 [parser] digester: avoid infinite loop when an invalid token is seen (#313) 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