Commit Graph

1151 Commits

Author SHA1 Message Date
385d05ce3e [parser] parser: support syntax for AUTO_RANDOM (#571) 2021-10-09 14:53:23 +08:00
5264503d28 [parser] mysql: update some TiDB customized error code (#671) 2021-10-09 14:53:23 +08:00
526e7683ef [parser] change sequence unreserved keyword (#673) 2021-10-09 14:53:23 +08:00
07751a60e2 [parser] parser: support index advisor (#667) 2021-10-09 14:53:23 +08:00
de4291013c [parser] ddl: add expression index support (#664)
* done

* update comment

* address comment and add error code

* address comment

* rename

* address comment

* fmt

*  address comment

* address comment
2021-10-09 14:53:23 +08:00
f7f50a28a7 [parser] DDL : add create sequence support & compatible with mariaDB except OrReplace. (#658)
* add create sequence support

* fix conflict

* be compatible with mariaDB

* add SignedNum and reformat indent

* add sequence test

* .

* address comment

* not support orreplace by now

* add sequence ddl

* add ddl restore test

* add : no cycle/no cache/no order

* .

* fix ident
2021-10-09 14:53:23 +08:00
a7ac29bd99 [parser] parser: introduce DigestNormalized and deprecate DigestHash (#656) 2021-10-09 14:53:23 +08:00
07f157ca8c [parser] model: add a function GetTypeDesc for ColumnInfo (#659) 2021-10-09 14:53:23 +08:00
f523233fff [parser] *: add flashback table syntax (#611) 2021-10-09 14:53:23 +08:00
8907945611 [parser] remove unnecessary variable (#655) 2021-10-09 14:53:23 +08:00
ef3cc1fe1c [parser] ast: support explain format hint (#654) 2021-10-09 14:53:23 +08:00
194335f65f [parser] model: add hidden to ColumnInfo (#621)
* add hidden

* make codecov happy

* support extended

* clean code

* address comment

* tweak

* address comment
2021-10-09 14:53:23 +08:00
cfabf36c6d [parser] add hint for (no_)swap_join_inputs (#652) 2021-10-09 14:53:23 +08:00
9b63f660c4 [parser] add error code from planner, expression and executor (#650) 2021-10-09 14:53:23 +08:00
c6e75130e8 [parser] parser: fix tableAlias in DeleteStmt (#521) 2021-10-09 14:53:23 +08:00
570f2f00a6 [parser] fix alter table convert to charset default syntax (#566) 2021-10-09 14:53:23 +08:00
c47b3b66dc [parser] parser: add mysql error ErrBadUser / ErrUserAlreadyExists (#644)
* parser: add mysql error `ErrBadUser`

* parser: add mysql error `ErrUserAlreadyExists`
2021-10-09 14:53:23 +08:00
4760408a32 [parser] parser: support syntax for manage bindings (#646) 2021-10-09 14:53:23 +08:00
4f6d359ac6 [parser] add errcode and errname for admin repair table (#639) 2021-10-09 14:53:23 +08:00
b26854fe0c [parser] parser: add mysql error ErrIncorrectType (#638) 2021-10-09 14:53:23 +08:00
0696e22474 [parser] mysql: add ddl-related error code and name (#630) 2021-10-09 14:53:23 +08:00
1207fc21e8 [parser] error code for sysvar.go (#634) 2021-10-09 14:53:23 +08:00
99d1a794b6 [parser] Add Cloud Spanner style read only transaction (#610)
* Add Cloud Spanner style read only transaction

* Put non keywords to the right place

Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>
2021-10-09 14:53:23 +08:00
17d58e390f [parser] add error class util (#628) 2021-10-09 14:53:23 +08:00
a98bbab0f8 [parser] *: spport primary key (#617) 2021-10-09 14:53:23 +08:00
097954ab2d [parser] parser: support drop specific plan binding (#620) 2021-10-09 14:53:23 +08:00
c13460aad7 [parser] support hint for indexMergeJoin and indexHashJoin (#619) 2021-10-09 14:53:23 +08:00
94eb38bc74 [parser] clean up error code and message for parser (#618) 2021-10-09 14:53:23 +08:00
5e0468c0d8 [parser] mysql: add error code and message for table related to error (#615) 2021-10-09 14:53:23 +08:00
c9f54a4447 [parser] add error code for types (#614)
Signed-off-by: Shuaipeng Yu <jackysp@gmail.com>
2021-10-09 14:53:23 +08:00
c3c8b147e9 [parser] add store limit error (#612) 2021-10-09 14:53:23 +08:00
cc817e1324 [parser] *: Support full-text search (#592)
add MATCH(col1,col2,...) AGAINST(expr [search_modifier]) syntax support
2021-10-09 14:53:23 +08:00
9b11c3d2ad [parser] revert pr 587 failed to parse WHERE / GROUP BY clauses in a SELECT statement without a FROM table (#597) 2021-10-09 14:53:23 +08:00
bfdd99ee93 [parser] mysql: add 2 infoschema related errors for TiDB (#595) 2021-10-09 14:53:23 +08:00
26b362d28c [parser] parser: rename 'timestampliteral' to avoid misuse of 'select timestampliteral()' (#591)
When the input is select timestamp '2019-10-29 16:14:42', it's parsed to something like

> 'select timestampliteral()'

`timestampliteral` is a valid function name in TiDB, used to implement the timestamp literal.

However, if the input is 'select timestampliteral()', we should reject this query.
This PR renames `timestampliteral` to avoid conflict.
2021-10-09 14:53:23 +08:00
6df7bce72f [parser] *: bump the Go compiler version to 1.13 (#593) 2021-10-09 14:53:23 +08:00
38fd2388f6 [parser] mysql: add some errors for TiDB (#584) 2021-10-09 14:53:23 +08:00
3fe6ed4c13 [parser] parser: support FLUSH LOGS | HOSTS syntax (#589) 2021-10-09 14:53:23 +08:00
9b4d96cd61 [parser] add copy go.mod1 to go.mod in Makefile (#588) 2021-10-09 14:53:23 +08:00
e879bc5fca [parser] parser: improve index merge hint (#590)
* add primary

* add test for primary
2021-10-09 14:53:23 +08:00
d18f635991 [parser] Fixed: failed to parse WHERE / GROUP BY clauses in a SELECT statement without a FROM table (#587) 2021-10-09 14:53:23 +08:00
b4395cd5a9 [parser] parser: support database name for optimizer hint (#586) 2021-10-09 14:53:23 +08:00
ebf8431a0e [parser] ast: add CachedNames for Prepared (#575) 2021-10-09 14:53:23 +08:00
88e4ec4ed9 [parser] ast: fix the bug of TableSource.Restore() (#539) 2021-10-09 14:53:23 +08:00
f26c3e85f4 [parser] parser: add support for SHUTDOWN syntax (#580)
* add support for SHUTDOWN syntax

* add SHUTDOWN privilege syntax
2021-10-09 14:53:23 +08:00
24a0caa4af [parser] *: suport alter table set flash replica syntax (#564) 2021-10-09 14:53:23 +08:00
ef25c58596 [parser] parser : support admin repair table syntax (#547)
* support admin repair table

* fix comment

* add ddl test

* fix depency
2021-10-09 14:53:23 +08:00
30e9b8f7d9 [parser] fix SET CHARSET | NAMES DEFAULT (#567)
* fix SET CHARSET | NAMES DEFAULT

* reindent the tab
2021-10-09 14:53:23 +08:00
9d0dae0e58 [parser] parser: add nowait keyword, add for update no wait grammar, and related error… (#582) 2021-10-09 14:53:23 +08:00
0e24ec224b [parser] remove GrantPriv from AllGlobalPrivs/AllDBPrivs/AllTablePrivs (#581)
* remove GrantPriv from AllGlobalPrivs/AllDBPrivs/AllTablePrivs

* handle testcase error
2021-10-09 14:53:23 +08:00