Commit Graph

64 Commits

Author SHA1 Message Date
6898975a7d parser: fix missing charset and collation of handle column (#30320) 2021-12-02 17:05:54 +08:00
17edc5758f parser: add ANALYZE TABLE t ALL COLUMNS syntax (#29361) 2021-11-10 18:17:05 +08:00
a3f3924388 parser: support analyze/stats options when create/alter table (#29056) 2021-10-27 14:54:49 +08:00
63d5b02496 DDL: Support skip placement validation (#29016) 2021-10-27 13:10:49 +08:00
1777bd0e86 ddl : support alter table xx cache operations (#29022) 2021-10-25 22:08:48 +08:00
xhe
94e30df8e2 parser: fix compiling, add unit tests (#28700) 2021-10-11 23:15:25 +08:00
fef35aa8df [parser] add placement rules to schema and partition (#1340)
Co-authored-by: Arenatlx <314806019@qq.com>
2021-10-09 14:53:23 +08:00
d3cff95f9e [parser] model: move placement policy definition into 2 parser (#1327) 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
c298f32dd3 [parser] ddl: admin show ddl jobs output confusing with multiple jobs (#1210)
* change "none" 2 "queueing"

Signed-off-by: lihaowei <haoweili35@gmail.com>

* 4 review

Signed-off-by: lihaowei <haoweili35@gmail.com>

* restore origin word

* *: change none 2 queueing
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
8cd0659690 [parser] set right not null flag when newing extra PK (#1189)
* set right not null flag when newing extra PK

* add test

* fmt

Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2021-10-09 14:53:23 +08:00
51f162cf17 [parser] model: add a version for the clustered index (#1172) 2021-10-09 14:53:23 +08:00
1f210fe678 [parser] model: add a new TableInfoVersion for separating id allocators (#1170) 2021-10-09 14:53:23 +08:00
6a18e2f063 [parser] *: support CLUSTERED and NONCLUSTERED syntax (#1153) 2021-10-09 14:53:23 +08:00
bba8f9579c [parser] model: Add StateGlobalTxnWriteOnly (#1104) 2021-10-09 14:53:23 +08:00
61d4863dab [parser] model: add functionality to check if a base table (#1080) 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
4d239a8573 [parser] *: tiny optimize for huge partition table (#1072)
* *: tiny optimize for huge partition table

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

* Update model/model.go

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

Co-authored-by: kennytm <kennytm@gmail.com>
2021-10-09 14:53:23 +08:00
fca01d8347 [parser] ddl: *support list column partition table (#1042) 2021-10-09 14:53:23 +08:00
090d5ccc98 [parser] model: support add extra partition ID column (#1010)
define ExtraPidColID
add NewExtraPartitionIDColInfo to support create extra pid column
2021-10-09 14:53:23 +08:00
7a64b806d6 [parser] model: support columar table (#1000) 2021-10-09 14:53:23 +08:00
0b129de5dd [parser] model: add DroppingDefinitions for PartitionInfo (#970) 2021-10-09 14:53:23 +08:00
ebb56dd2c8 [parser] model: fix null origin default value for bit column (#983) 2021-10-09 14:53:23 +08:00
96f79a6832 [parser] model: add replica only type to string (#978) 2021-10-09 14:53:23 +08:00
aa4be370de [parser] model: add ChangeStateInfo to ColumnInfo (#966) 2021-10-09 14:53:23 +08:00
8fcee19e85 [parser] parser: append replica-only state to previous one strictly (#952) 2021-10-09 14:53:23 +08:00
314dd77cd0 [parser] parser: substitute state field with addingDefinition in partitionInfo (#947) 2021-10-09 14:53:23 +08:00
8b78e03aa6 [parser] parser: add a state field for partitionDefinition (#927)
* add schema state for partition definition

Signed-off-by: AilinKid <314806019@qq.com>

* add clone function

Signed-off-by: AilinKid <314806019@qq.com>

* change value copy to slice element self

Signed-off-by: AilinKid <314806019@qq.com>
2021-10-09 14:53:23 +08:00
9973ce7e1f [parser] model: add a Global field to IndexInfo (#917)
Co-authored-by: tangenta <tangenta@126.com>
Co-authored-by: kennytm <kennytm@gmail.com>
2021-10-09 14:53:23 +08:00
b3c477a7c0 [parser] model: add OriginDefaultValueBit field to ColumnInfo (#904)
* model: add OriginDefaultValueBit field for ColumnInfo

* add test for column default value
2021-10-09 14:53:23 +08:00
329541ccbd [parser] parser: support alter table add/drop/alter constraint (#899) 2021-10-09 14:53:23 +08:00
07de176c89 [parser] parser: support check constraints field (#871) 2021-10-09 14:53:23 +08:00
a5b6246135 [parser] model: add IsCommonHandle field on TableInfo (#850) 2021-10-09 14:53:23 +08:00
97e61aea57 [parser] parser: add auto_random table option support (#823)
* add auto_random table option support

* .

* .
2021-10-09 14:53:23 +08:00
22fc63f328 [parser] parser: add autoid cache option (#765) 2021-10-09 14:53:23 +08:00
511776d406 [parser] parser: remove sequence order option support (#796) 2021-10-09 14:53:23 +08:00
486bd152dc [parser] model: add invisible option for IndexInfo (#771)
* model: add invisible option for IndexInfo

* fmt

Co-authored-by: kennytm <kennytm@gmail.com>
2021-10-09 14:53:23 +08:00
12683245ad [parser] parser: remove useless IndexToProto,ColumnToProto,ColumnsToProto function (#762) 2021-10-09 14:53:23 +08:00
126233c2b1 [parser] model: do not rewrite collation id as default for tipb. (#752) 2021-10-09 14:53:23 +08:00
9a0826d097 [parser] model: add partition replica available info to support partition table in tiflash (#742)
Signed-off-by: crazycs <crazycs520@gmail.com>
2021-10-09 14:53:23 +08:00
2549fe5ce1 [parser] parser: support expression restored string in default value. (#731) 2021-10-09 14:53:23 +08:00
b3ae107597 [parser] fix json field name in #571 (#702) 2021-10-09 14:53:23 +08:00
b5701d9165 [parser] parser : Add model & errcode & errname for supporting sequence. (#691) 2021-10-09 14:53:23 +08:00
385d05ce3e [parser] parser: support syntax for AUTO_RANDOM (#571) 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
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
24a0caa4af [parser] *: suport alter table set flash replica syntax (#564) 2021-10-09 14:53:23 +08:00
7c3199735d [parser] add support for RTREE index (#433) 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