Commit Graph

435 Commits

Author SHA1 Message Date
386287d9b4 [parser] Support add/drop attributes for table or partition (#1271) 2021-10-09 14:53:23 +08:00
742f960ce7 [parser] parser: add plan recreator statement (#1278) 2021-10-09 14:53:23 +08:00
217cd12248 [parser] parser: support Oracle translate function (#1283) 2021-10-09 14:53:23 +08:00
276a575804 [parser] Restart statement support (#1267)
Co-authored-by: tangenta <tangenta@126.com>
2021-10-09 14:53:23 +08:00
eca248cb71 [parser] Correct typo: s/TslNone/TlsNone/ (#1270) 2021-10-09 14:53:23 +08:00
a8fd323ac6 [parser] parser: fix the compatiblity of explain_format (#1262) 2021-10-09 14:53:23 +08:00
c1acf6df1f [parser] parser: ensure NOT NOT EXISTS is the same as EXISTS (#1254) 2021-10-09 14:53:23 +08:00
b7eaefe9db [parser] parser: support alter table force auto_increment (#1261)
* parser: support alter table force auto_increment

* support alter force auto_random_base

Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2021-10-09 14:53:23 +08:00
c0fd7427f1 [parser] Add 'HELP' statement support (#1250) 2021-10-09 14:53:23 +08:00
4c25d15dc0 [parser] fix the usage of ODBC style time literal (#1253) 2021-10-09 14:53:23 +08:00
12d0a279c4 [parser] parser,ast: Support for authentication plugins (#1236) 2021-10-09 14:53:23 +08:00
732586d33f [parser] *: clean up the deserted syntax of START TRANSACTION READ ONLY (#1230)
* Clean up the deserted syntax of START TRANSACTION READ ONLY

Signed-off-by: JmPotato <ghzpotato@gmail.com>
2021-10-09 14:53:23 +08:00
528cb4f912 [parser] remove duplicated (#1229)
Signed-off-by: yisaer <disxiaofei@163.com>
2021-10-09 14:53:23 +08:00
e8aea0f97d [parser] parser: add AsOfClause for START TRANSACTION READ ONLY statement (#1215)
* Add AsOfClause for START TRANSACTION READ ONLY statement

Signed-off-by: JmPotato <ghzpotato@gmail.com>
2021-10-09 14:53:23 +08:00
0c43f7f38c [parser] parser, ast: make parser happy for PARTITION BY [LINEAR] KEY ALGORITHM syntax (#1221)
* parser, ast: make parser happy for PARTITION BY [LINEAR] KEY ALGORITHM synta

* Update ast/ddl.go

Co-authored-by: kennytm <kennytm@gmail.com>

* remove useless import

Co-authored-by: kennytm <kennytm@gmail.com>
2021-10-09 14:53:23 +08:00
8dfa8f1136 [parser] parser: Compatible with mysql fix select 1 group by 1 (#1223) 2021-10-09 14:53:23 +08:00
434ae88964 [parser] ast: add resultSetNode() to ResultSetNode (#1216)
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2021-10-09 14:53:23 +08:00
c72868080c [parser] fix CTE parser (#1217)
Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>
2021-10-09 14:53:23 +08:00
fd730ec231 [parser] parser: support the 'create global temporary table' syntax (#1211) 2021-10-09 14:53:23 +08:00
b6c5ada1d5 [parser] *: add as of clause for SET and SELECT (#1206)
* *: add as of clause

Signed-off-by: nolouch <nolouch@gmail.com>

* resolve shift-reduce conflict

* *: fix and try to add test

Signed-off-by: nolouch <nolouch@gmail.com>

* *: add timestamp

Signed-off-by: nolouch <nolouch@gmail.com>

* make as of to token

Signed-off-by: nolouch <nolouch@gmail.com>

* address comments

Signed-off-by: nolouch <nolouch@gmail.com>

* add test

Signed-off-by: nolouch <nolouch@gmail.com>

* make of as Reserved(from mysql 8.0)

Signed-off-by: nolouch <nolouch@gmail.com>

* add set test case

Signed-off-by: nolouch <nolouch@gmail.com>

* address comment

Signed-off-by: nolouch <nolouch@gmail.com>

Co-authored-by: tangenta <tangenta@126.com>
2021-10-09 14:53:23 +08:00
ccf996259d [parser] support CTE clause (#1207) 2021-10-09 14:53:23 +08:00
940fbea282 [parser] parser, ast: add RENAME USER stmt (#1204) 2021-10-09 14:53:23 +08:00
c80bc1e8f9 [parser] parser, ast: add explain for ALTER TABLE (#1196)
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2021-10-09 14:53:23 +08:00
5020689f09 [parser] parser: Add truncate all support (#1179)
* remove warning
* make parser
2021-10-09 14:53:23 +08:00
a27471d6df [parser] statistics: introduce a new kind of syntax to drop global-stats #1181 2021-10-09 14:53:23 +08:00
cead7b3c5d [parser] parser: support show stats_extended syntax (#1178) 2021-10-09 14:53:23 +08:00
747a99dd53 [parser] add the new stmt: drop stats partition (#1177) 2021-10-09 14:53:23 +08:00
7aa3bf1b2f [parser] Add "START TRANSACTION WITH CAUSAL CONSISTENCY ONLY" (#1162)
* add a start transaction without external consistency statement

Signed-off-by: ekexium <ekexium@gmail.com>

* change the grammar to 'with causal consistency'

Signed-off-by: ekexium <ekexium@gmail.com>

* rename WithoutExternalConsistency to CausalConsistency

Signed-off-by: ekexium <ekexium@gmail.com>

* change syntax to 'start transaction with causal consistency only'

Signed-off-by: ekexium <ekexium@gmail.com>

Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2021-10-09 14:53:23 +08:00
ef95ffa348 [parser] parser, ast: replace TIDB_STATS with STATS_EXTENDED (#1159) 2021-10-09 14:53:23 +08:00
5e94208b8b [parser] ast, misc, parser: add FLUSH CLIENT_ERRORS_SUMMARY (#1154) 2021-10-09 14:53:23 +08:00
e944f5cfcb [parser] *: add CREATE IMPORT and other control statement (#1147) 2021-10-09 14:53:23 +08:00
6a18e2f063 [parser] *: support CLUSTERED and NONCLUSTERED syntax (#1153) 2021-10-09 14:53:23 +08:00
a0c6fa67ae [parser] remove proxy from reserved keyword (#1150)
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
2021-10-09 14:53:23 +08:00
df2a55a4cc [parser] parser: compatible with select...for share statement (#946)
* parser: compatible with `select...for share` statement

* parser: parse `LOCK IN SHARE MODE` into `FOR SHARE` and support `NOWAIT` & `SKIP LOCKED`

* merge master

* SelectLockType.String() returns string only

* update parser_test.go

* resolve conflicts
2021-10-09 14:53:23 +08:00
a3519e86f4 [parser] *: create / drop extended stats by ALTER TABLE (#1138) 2021-10-09 14:53:23 +08:00
df89db3af2 [parser] parser: change the trace statement default format to row (#1107)
* parser: change trace statement default format to row

* fix CI

Co-authored-by: tangenta <tangenta@126.com>
2021-10-09 14:53:23 +08:00
8950ad0f44 [parser] *: support dynamic privileges and more extended privileges (#1144)
* *: support dynamic privileges and more extended privileges

* address comment

* address comment
2021-10-09 14:53:23 +08:00
d0d67ddb9e [parser] *: support GRANT PROXY (#1142) 2021-10-09 14:53:23 +08:00
593668b982 [parser] parser: Compatible with mysql8 fix select 1 where 1=1 (#1131) 2021-10-09 14:53:23 +08:00
21bcae2c9c [parser] parser: remove invalid syntax (#1134)
* remove

* Merge remote-tracking branch 'upstream/master' into remove-dot

# Conflicts:
#	parser.go

* add test

* add test

* Merge remote-tracking branch 'upstream/master' into remove-dot

# Conflicts:
#	parser.go
2021-10-09 14:53:23 +08:00
22aef2341f [parser] ast, parser: add FUNCTION and PROCEDURE for GRANT object_type (#1136) 2021-10-09 14:53:23 +08:00
207955cf69 [parser] *: change privilege type to uint64 and support REPLICATION CLIENT, etc (#1121) 2021-10-09 14:53:23 +08:00
78d16b53a2 [parser] ast, parser: fix parse join (#1129) 2021-10-09 14:53:23 +08:00
5d600ee3b0 [parser] *: support multiple select options (#1122)
* done

Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>

* done

Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>

* clean

Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>

* fix

Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>

* fix

Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>

* clean

Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>

* address comment

Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>
2021-10-09 14:53:23 +08:00
9fb295fcc8 [parser] parser.y: populate the Fields field for TABLE and VALUES statements (#1118) 2021-10-09 14:53:23 +08:00
0529fa31aa [parser] parser: add grammar show stats_topn (#1109) 2021-10-09 14:53:23 +08:00
7a252afa7b [parser] parser, ast: track if order is implicit ASC/DESC (#1101)
* Add nillable type of byitem

* parser, ast: track if order is implicit ASC/DESC

Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2021-10-09 14:53:23 +08:00
42ac1b81d6 [parser] parser: add RESUME and BRIEOptionLevel for IMPORT (#1100) 2021-10-09 14:53:23 +08:00
8a2041474b [parser] parser: add PURGE IMPORT (#1102) 2021-10-09 14:53:23 +08:00
67c73b4af9 [parser] restore: make restore sql contains charset information even default charset (#1012) 2021-10-09 14:53:23 +08:00