Commit Graph

143 Commits

Author SHA1 Message Date
d0f8487dea *: support specifying range bits for auto_random (#36860)
close pingcap/tidb#32508
2022-08-16 20:54:50 +08:00
a08401b878 parser: support TOKUDB_ZSTD (#36945)
close pingcap/tidb#36953
2022-08-12 14:40:48 +08:00
d6d0ce7b10 *: gofmt code for adapting go 1.19 (#36832)
ref pingcap/tidb#36879
2022-08-11 12:50:49 +08:00
42935af3cc parser,ddl: Interval partitioning (#35662)
ref pingcap/tidb#19132, close pingcap/tidb#35683
2022-08-09 19:06:49 +08:00
158ba1a1d9 *: enable part revive for all code (#36703) 2022-08-01 14:02:06 +08:00
911e7cc360 *: enable revive (#35970)
ref pingcap/tidb#35345
2022-07-15 16:03:06 +08:00
6e22e47f06 parser,ddl: support 'set tiflash mode' ddl and support check tiflash mode in tiflash_replica table (#35851)
ref pingcap/tidb#35850
2022-07-07 15:15:03 +08:00
e752e1c020 parser: XXXDatabaseStmt now use CIStr for DB name (#35668)
close pingcap/tidb#35622
2022-06-24 19:04:37 +08:00
46c43febca parser: add RemovePlacementRuleFlag (#33161)
close pingcap/tidb#33160
2022-03-17 01:27:53 +08:00
8c04d41c48 parser: support ALTER DATABASE t SET TIFLASH REPLICA in grammar (#32255)
ref pingcap/tidb#32254
2022-02-17 14:25:39 +08:00
c589ee5471 *: remove direct placement from models (#31816)
close pingcap/tidb#31427
2022-01-20 00:47:45 +08:00
50dfe6b7bf ddl: Move placement to special comment for ddl sql in binlog (#31454)
close pingcap/tidb#31453
2022-01-11 14:09:41 +08:00
13d0deb7fe parser: respect TiDB comment when DROP INDEX IF EXISTS (#30173) 2021-11-30 19:35:53 +08:00
4063e9c2e6 ddl: add support create or replace placement policy (#29865) 2021-11-18 14:17:47 +08:00
dbea9892c4 *: Remove old syntax ALTER TABLE ... ADD/REMOVE/ALTER PLACEMENT POLICY ... (#29603) 2021-11-10 01:19:06 +08:00
49d995d577 *: Remove ALTER TABLE ... ALTER PARTITION ... (#29556) 2021-11-08 18:05:04 +08:00
a3f3924388 parser: support analyze/stats options when create/alter table (#29056) 2021-10-27 14:54:49 +08:00
549fac6b26 parser: support the 'alter table xx cache' and 'alter table xx nocache' (#28922) 2021-10-21 10:36:45 +08:00
xhe
94e30df8e2 parser: fix compiling, add unit tests (#28700) 2021-10-11 23:15:25 +08:00
bd299b990e [parser] charset: fix Encoding.Encode() and add some tests (#1344) 2021-10-09 14:53:23 +08:00
0b34158309 [parser] DDL: Add support for placement feature id(/*T![placement]... */). (#1334) 2021-10-09 14:53:23 +08:00
1057322cf7 [parser] parser: support create and alter placement policy (#1313) 2021-10-09 14:53:23 +08:00
xhe
0c458aca02 [parser] *: support new placement rules syntax (#1299) 2021-10-09 14:53:23 +08:00
0036788fc0 [parser] add special comments support for index constraints (#1296) 2021-10-09 14:53:23 +08:00
55074f2a24 [parser] parser: support drop placement policy (#1295) 2021-10-09 14:53:23 +08:00
3ed80be1c4 [parser] restore: support restoring SQL wrapping with TiDB special comments (#1287) 2021-10-09 14:53:23 +08:00
386287d9b4 [parser] Support add/drop attributes for table or partition (#1271) 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
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
fd730ec231 [parser] parser: support the 'create global temporary table' syntax (#1211) 2021-10-09 14:53:23 +08:00
xhe
bc860cdd5e [parser] *: fix static check report (#1195)
* ast: base.go

Signed-off-by: xhe <xw897002528@gmail.com>

* ast: expressions.go

Signed-off-by: xhe <xw897002528@gmail.com>

* ast: misc_test.go

Signed-off-by: xhe <xw897002528@gmail.com>

* *: digester.go

Signed-off-by: xhe <xw897002528@gmail.com>

* goyacc: format_yacc.go

Signed-off-by: xhe <xw897002528@gmail.com>

* *: lexer_test.go

Signed-off-by: xhe <xw897002528@gmail.com>

* *: misc.go

Signed-off-by: xhe <xw897002528@gmail.com>

* model: model.go

Signed-off-by: xhe <xw897002528@gmail.com>

* model: model_test.go

Signed-off-by: xhe <xw897002528@gmail.com>

* *: parser_test.go

Signed-off-by: xhe <xw897002528@gmail.com>

* test_driver: test_driver_datum.go

Signed-off-by: xhe <xw897002528@gmail.com>

* test_driver: test_driver_mydecimal.go

Signed-off-by: xhe <xw897002528@gmail.com>

* ast: ddl.go, bugfix

Signed-off-by: xhe <xw897002528@gmail.com>

* mysql: errcode.go

charset/charset.go is passing errcode to NewStd, which requires int. But
here codes are uint16. To get rid of the error, uint16 is removed.

Signed-off-by: xhe <xw897002528@gmail.com>

* model: better test

Signed-off-by: xhe <xw897002528@gmail.com>

* *: fix timezone

Signed-off-by: xhe <xw897002528@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
6a18e2f063 [parser] *: support CLUSTERED and NONCLUSTERED syntax (#1153) 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
ed62659e39 [parser] *: add alter table read only/write support (#1095) 2021-10-09 14:53:23 +08:00
b76254849a [parser] support SELECT FROM TABLESAMPLE syntax (#1071)
* support SELECT FROM TABLESAMPLE syntax

* refine naming

* make table sample clause as a part of TableFactor

* address comment
2021-10-09 14:53:23 +08:00
02e1f6b198 [parser] parser.y: distinguish between empty string index and anonymous index (#1059) 2021-10-09 14:53:23 +08:00
eb188bac29 [parser] ddl: support multiple table rename (#1021) 2021-10-09 14:53:23 +08:00
c7f93089c6 [parser] goyacc: record the original text position in AST (#984) 2021-10-09 14:53:23 +08:00
c20039dd15 [parser] ast: Don't write comma when restore TableOption of ALTER TABLE (#1061) 2021-10-09 14:53:23 +08:00
caa3a88377 [parser] parser: support alter sequence (#1046) 2021-10-09 14:53:23 +08:00
5c19e29b5c [parser] parser : support table statement and value statement (#1026)
* implement Table stmt

* fmt

* add TableStmt into Statement rule, fix OFFSET rule

* support TableStmt in InsertStmt

* remove TableStmtLimit, use SelectStmtLimit instead

* support basic setoptr, need to fix a lot things

* support INTO OUTFILE

* support CREATE TABLE and CREATE VIEW

* support basic VALUES stmt

* fmt

* implement set operation for table

* add some comment

* fix the wrong implements of TABLE stmt

* fix the wrong implements of VALUES stmt

* fix SetOprNode interface

* rename the fields refer to SetOpr statement, fix some comments

* finish

* remove unused comment

* resolve conflicts

* refactor

* resolve conflicts

* fix small problems

* remove wrong use of RowStmtField
2021-10-09 14:53:23 +08:00
dcc137315f [parser] fix: string(int) expression not allowed on Go1.15 (#1003)
Make test will fail due to Go1.15 starts to not allow "string(int)" expression.
Fix affected sources by replace such expression to legal expressions.

More info about ban string(int), see: https://github.com/golang/go/issues/3939

Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2021-10-09 14:53:23 +08:00
xhe
691be56704 [parser] parser: support placement rules for ALTER TABLE (#964)
It's a part of project "Placement rules in SQL". It also includes a fix
for multiple subclause restore(did not add ',' before) and two tests for
this case.
2021-10-09 14:53:23 +08:00
xhe
3829a68c83 [parser] parser: support DROP PLACEMENT clause (#961)
It's a part of project "Placement rules in SQL".
2021-10-09 14:53:23 +08:00
xhe
cb1c19623a [parser] parser: support ALTER PLACEMENT clause (#937)
It's a part of project "Placement rules in SQL".
2021-10-09 14:53:23 +08:00
xhe
88e2440084 [parser] parser: more meaningful words for placement rules (#931)
follow
https://github.com/pingcap/tidb/issues/18030#issuecomment-654943694.
However, "constraints" is used for "label". Because it is not
necessarily related to region/locality.
2021-10-09 14:53:23 +08:00
xhe
c307c0dab5 [parser] parser: support ALTER PARTITION clause (#921) 2021-10-09 14:53:23 +08:00
07de176c89 [parser] parser: support check constraints field (#871) 2021-10-09 14:53:23 +08:00
9ad0d12a08 [parser] parser: add new ddl action AlterIndexVisibility (#840) 2021-10-09 14:53:23 +08:00