Commit Graph

1272 Commits

Author SHA1 Message Date
faaef33f76 [parser] fix: remove warning in parser for rebuild/check/optimize/repair partition (#920)
Signed-off-by: Wang Ruichao <wangruichao2014@xiaochuankeji.cn>
2021-10-09 14:53:23 +08:00
xhe
2dbf28d553 [parser] fix: correct file permission (#918)
Commit 334dfef16055ffaf9c704b7ad25ce7540cb6ce38 changed several files into
executables. Commit f6e17887c998e7c7d460bfabb198ed5f53dd22a2 reverted the
permission of parser_test.go from 755 to 644, but missed all other
files. Later go.mod1/go.sum1 are removed. This commit fixed the
permission of remaining affected files.
2021-10-09 14:53:23 +08:00
7589d60ccb [parser] fix: remove warning in "remove partitioning" (#914)
Signed-off-by: Wang Ruichao <wangruichao2014@xiaochuankeji.cn>
2021-10-09 14:53:23 +08:00
f50f4dcdc3 [parser] ast/functions: add tidb_decode_base64 function (#911) 2021-10-09 14:53:23 +08:00
672f8b3ed5 [parser] docs: rewrite quickstart.md (#884) 2021-10-09 14:53:23 +08:00
3e8e073033 [parser] Add Admin Telemetry Statement (#908)
* Add telemetry tokens to admin statement

Signed-off-by: Breezewish <me@breeswish.org>

* Merge ADMIN SHOW TELMETRY_ID and ADMIN SHOW TELEMETRY_DATA

Signed-off-by: Breezewish <me@breeswish.org>
2021-10-09 14:53:23 +08:00
b5dafb9522 [parser] parser: fix signed num will parse error when it encounter two's complement min (#905) 2021-10-09 14:53:23 +08:00
14a88e41ec [parser] Add hint for broadcast join. (#818)
* add hint for bc join

* refine

* add hint for bc join

* refine

* refine

* refine

* refine again

* pass test

* fix compile error

* add prefer local

* use bcj_local

* change bc_join to broadcast_join

Co-authored-by: xufei <xufeixw@mail.ustc.edu.cn>
Co-authored-by: ichn-hu <zfhu16@fudan.edu.cn>
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
fa0c1896c7 [parser] let function names like a.b() be parsed successfully (#876) 2021-10-09 14:53:23 +08:00
cb9c1833c9 [parser] add hint nth_plan for plan test. (#893) 2021-10-09 14:53:23 +08:00
1bbc918016 [parser] model: correct the usage of json.Unmarshal in DecodeArgs (#890) 2021-10-09 14:53:23 +08:00
320651b789 [parser] Add more fields in DiffSchema for exchanging partition (#883)
Co-authored-by: Lynn <zimu_xia@126.com>
Co-authored-by: kennytm <kennytm@gmail.com>
Co-authored-by: tiancaiamao <tiancaiamao@gmail.com>
2021-10-09 14:53:23 +08:00
027524a52a [parser] fix charset alias in case function (#891) 2021-10-09 14:53:23 +08:00
962f231781 [parser] remove the empty branch in VariableAssignmentList (#886) 2021-10-09 14:53:23 +08:00
772de04d12 [parser] ddl: remove warning for constraint and check clause (#888) 2021-10-09 14:53:23 +08:00
5fbefe7612 [parser] update the join links in README.md (#875) 2021-10-09 14:53:23 +08:00
ecb9e410a4 [parser] parser: support partition in table hint (#880) 2021-10-09 14:53:23 +08:00
bc08b269a0 [parser] support require SAN clause (#877)
* Support `require SAN` clause

* address comments
2021-10-09 14:53:23 +08:00
07de176c89 [parser] parser: support check constraints field (#871) 2021-10-09 14:53:23 +08:00
634e6d09e0 [parser] add nooncall/shazam into user list in README.md (#866) 2021-10-09 14:53:23 +08:00
814bac8c12 [parser] parser: support partition selection grammer for the delete statement (#868) 2021-10-09 14:53:23 +08:00
7550c31db7 [parser] parser: add new agg function APPROX_COUNT_DISTINCT (#854)
Signed-off-by: Tong Zhigao <tongzhigao@pingcap.com>
2021-10-09 14:53:23 +08:00
9b457148b7 [parser] support the syntax insert into tbl_name partition (#856)
* test

* support the syntax insert into tbl_name partition

* address comment
2021-10-09 14:53:23 +08:00
5638d0cf6d [parser] support show table partition regions (#855)
Signed-off-by: crazycs520 <crazycs520@gmail.com>
2021-10-09 14:53:23 +08:00
cae9d348f2 [parser] Fix set charset statement (#836) 2021-10-09 14:53:23 +08:00
56449d183d [parser] *: Add ddl Action Exchange partition (#852)
* add action of exchange partition

* delete warn

* recreat parser.go
2021-10-09 14:53:23 +08:00
408cf40985 [parser] Unreserved 8 keywords (#851)
* parser.y: unreserve 8 keywords

* consistent_test: added an optional test to check against MySQL keywords
2021-10-09 14:53:23 +08:00
4d341938ee [parser] ast: implement SensitiveStmtNode for BRIEStmt (#842) 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
bcc3e3b2d2 [parser] parser: support TableOptimizerHints in InsertStmt (#845) 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
5757f0b3c8 [parser] types: Update FieldType.Equal safety. (#841)
* Fix float flen free bug.

* Add unit test
2021-10-09 14:53:23 +08:00
359debdae6 [parser] Remove unnecessary .(string) casting and $$ = $1 from parser.y (#825)
* parser: use <ident> rather than <item> for string-only rules

This get rid of many .(string) casts.

* parser: get rid of unnecessary $$ = $1.
2021-10-09 14:53:23 +08:00
3a347a826b [parser] parser: introduce a new privilege for the set config statement (#835) 2021-10-09 14:53:23 +08:00
cda62de3ce [parser] types: Don't check Flen when Tp is double or float in FieldType.Equal. (#832)
* float flen free.

* Fix bug.
2021-10-09 14:53:23 +08:00
e228ea6519 [parser] parser: change CONFIG to an unreserved keyword 2021-10-09 14:53:23 +08:00
6c03d809f2 [parser] Update BACKUP/RESTORE syntax to match the RFC; Added IMPORT statement (#824)
* *: remove the s3/gcs-specific options

* *: replace the INCREMENTAL UNTIL syntax with LAST_BACKUP = ...

* *: use SHOW BACKUPS rather than SHOW BACKUP

* *: added IMPORT statements and options
2021-10-09 14:53:23 +08:00
96e2a03403 [parser] parser: rename auto rand table option (#828) 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
34c18a6ee0 [parser] add some tests for ignore_plan_cache, and correct a bug in parser.y (#822) 2021-10-09 14:53:23 +08:00
7f7e9bf8df [parser] parser: support using dash('-') in config item names (#821) 2021-10-09 14:53:23 +08:00
29c3fc2591 [parser] parser: add order by clause in group_concat (#813) 2021-10-09 14:53:23 +08:00
f1d610f394 [parser] fix type conversion panic from NUM to int64 (#809)
* fix conversion panic from NUM to int64

* catch teardown error

* polish int64num description

Co-authored-by: kennytm <kennytm@gmail.com>
2021-10-09 14:53:23 +08:00
928eb78a0e [parser] add func: mvcc_get_by_hex (#805)
Signed-off-by: Qiannan Lyu <lvqiannan@gmail.com>

Co-authored-by: Lingyu Song <songlingyu@pingcap.com>
2021-10-09 14:53:23 +08:00
2131dae117 [parser] terror: print the stack in terror.Log() (#803)
* terror: print the stack in terror.Log()

In TiDB, terror.Log(err) is called when we expect the error to be nil
and get rid of the annoying golint check.
Sometimes the error is not nil as expected, so it's better to print the
stack to find why

* go fmt

* address comment

* address comment
2021-10-09 14:53:23 +08:00
22fc63f328 [parser] parser: add autoid cache option (#765) 2021-10-09 14:53:23 +08:00
8598cb86e9 [parser] parser: remove with/without validation unsupported warning in parser (#795) 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