Commit Graph

499 Commits

Author SHA1 Message Date
3283ef24ea [parser] ddl: add admin restore syntax support (#85)
eg: admin restore table by job 11
2021-10-09 14:53:23 +08:00
6bb3bb224c [parser] parser: support show create database if not exists syntax (#148)
See: https://dev.mysql.com/doc/refman/5.7/en/show-create-database.html
2021-10-09 14:53:23 +08:00
999d8a9573 [parser] parser: implement Restore for BeginStmt,CommitStmt,RollbackStmt, AnalyzeTableStmt and LoadStatsStmt (#144) 2021-10-09 14:53:23 +08:00
7287ea54b8 [parser] parser: implement Restore for Constraint (#127) 2021-10-09 14:53:23 +08:00
ef194ccb59 [parser] parser: implement Restore for RenameTableStmt (#114) 2021-10-09 14:53:23 +08:00
433fd2d301 [parser] lexer: recognize "@@system var" and fix start offset of "@user var" (#112) 2021-10-09 14:53:23 +08:00
3d72ea20a9 [parser] fix hint handle bug in subquery (#120) 2021-10-09 14:53:23 +08:00
023cd7dcfb [parser] impl Restore of DropTableStmt (#107) 2021-10-09 14:53:23 +08:00
8862bb53b1 [parser] ignore hint when meet unknow token in hint (#80) 2021-10-09 14:53:23 +08:00
a8463b6756 [parser] parser: implement Restore for DropStatsStmt (#97) 2021-10-09 14:53:23 +08:00
a766069705 [parser] parser: implement Restore for DropIndexStmt (#83) 2021-10-09 14:53:23 +08:00
3d7841959f [parser] parser: add RestoreCtx and change the Node interface (#78) 2021-10-09 14:53:23 +08:00
03f56baa05 [parser] parser,ast: parse ALTER TABLE .. TRUNCATE PARTITION (#74) 2021-10-09 14:53:23 +08:00
7c7fca61e3 [parser] parser: implement drop view parse (#67) 2021-10-09 14:53:23 +08:00
112401e071 [parser] ast: implement the Restore function of UseStmt 2021-10-09 14:53:23 +08:00
8a205ccc0a [parser] *: support AST to SQL text (#56)
* ast2sql demo

* add SQLSentence

* mock func Restore

* change copyright

* add comment

* add test

* change tidb dependentment

* fix error comment

* use strings.Builder

* fix test

* add error return value for Recoverable

* add error return value for Recoverable

* add error return value for Recoverable

* impl Restore of UnaryOperationExpr

* integrate utils

* switch tidb dependency

* add comment

* add comment

* update unit test

* fix Restore of DatabaseOption

* fix Restore of DatabaseOption

* fix Restore of DatabaseOption

* update unit test

* use errorf
2021-10-09 14:53:23 +08:00
6e9eb8642d [parser] parser: support disable window function parser (#60) 2021-10-09 14:53:23 +08:00
7507d986f9 [parser] *: support new aggregation function var_pop and var_samp (#53) 2021-10-09 14:53:23 +08:00
fd3b6465ca [parser] ast, parser: extract create view parameters to CreateViewStmt (#55) 2021-10-09 14:53:23 +08:00
326ba018bd [parser] ast: Fix FrameBound.Accept (#51) 2021-10-09 14:53:23 +08:00
b9e1bf0af6 [parser] add from_tso function (#48) 2021-10-09 14:53:23 +08:00
1846343179 [parser] parser,ast: support alter table add partition partitions by hash partitioned table syntax (#41)
* support alter table add partition partitions by hash syntax
2021-10-09 14:53:23 +08:00
fa3239e982 [parser] parser: SetText for trace statement and set default format to json (#46) 2021-10-09 14:53:23 +08:00
87917e47b4 [parser] parser,ast: fix create table partition by hash syntax (#33) 2021-10-09 14:53:23 +08:00
16d599c1e4 [parser] union: fix union dual table order by (#22) 2021-10-09 14:53:23 +08:00
5fe32fea5d [parser] parser: fix select field text (#30) 2021-10-09 14:53:23 +08:00
e18cfdc62b [parser] parser: support window function grammar (#21) 2021-10-09 14:53:23 +08:00
53c43f7259 [parser] *: support for the statement of "admin show tableName next row id" (#19) 2021-10-09 14:53:23 +08:00
8d82156a1c [parser] parser: support identifiers for window function (#18) 2021-10-09 14:53:23 +08:00
1edbdcaaf9 [parser] add tests 2021-10-09 14:53:23 +08:00
3400fec39a [parser] add tests 2021-10-09 14:53:23 +08:00
df45c95cec [parser] parser: support grammar use index(primary) without backquote 2021-10-09 14:53:23 +08:00
c270f55405 [parser] *: move github.com/pingcap/tidb/parser here (#1) 2021-10-09 14:53:23 +08:00
89dda9d9a8 *: move parser to a separate repository (#8036) 2018-10-25 11:12:10 +08:00
50eb73f24a parser: support := in the set syntax (#8018)
According to MySQL document, `set` use the = assignment operator,
but the := assignment operator is also permitted
2018-10-24 13:27:58 +08:00
25118db843 *: move ast.NewValueExpr to standalone parser_driver package (#7952)
Make the ast package get rid of the dependency of types.Datum
2018-10-19 19:37:55 +08:00
4de888757d parser: fix bug empty string in "ESCAPED BY" subclause of "FIELDS" cause panic (#7880) 2018-10-14 08:36:24 +08:00
7229b32a25 *: support auto analyze partition table (#7789) 2018-10-12 20:57:59 +08:00
b3ef641f4b types: fix bug which Float type is not effective in AddDate & SubDate function (#7840) 2018-10-12 18:36:35 +08:00
d60a1a227b plan: build anti semi join for NOT EXISTS (#7842) 2018-10-09 16:57:15 +08:00
cfd4544801 ddl:support show create table with compression (#7782) 2018-09-26 18:13:03 +08:00
b098b47b0b parser,ast: parse admin show slow statement (#7688)
Add the following new syntax:
* admin show slow top [internal | all] N
* admin show slow recent N
2018-09-26 14:04:54 +08:00
cb03f2bec1 move from juju/errors to pkg/errors (#7151) 2018-09-12 15:42:20 +08:00
b2bfd8f91a executor: support load data with ignore lines (#7576) 2018-09-06 22:58:06 +08:00
e7afbb2713 *: make analyze buckets number configurable (#7619) 2018-09-06 17:16:23 +08:00
1f2841fbd4 ddl: year type should have an unsigned flag (#7542) 2018-08-31 16:45:38 +08:00
2ac2faf29f parser: support SUBPARTITION grammar for table partition (#7470) 2018-08-23 16:39:04 +08:00
69b13c59d6 parser: enhance the compatibility for table partition (#7440)
* 'COMMENT = xxx' and 'COMMENT xxx' are both acceptable, '=' is optional
* Add 'TABLESPACE xxx' to partition definition option
* For 'ENGINE = xxx', 'COMMENT = xxx', 'TABLESPACE xxx' options, the order is exchangable
2018-08-21 16:58:05 +08:00
2ae4f7f3d2 parser: add 'IDENTIFIED WITH' option on create user statement (#7402)
* fix issue 7295
2018-08-17 13:52:28 +08:00
4684eec521 parser: support to character option to load data statement (#7391) 2018-08-15 11:05:43 +08:00