Skip to content
TiDB SQL Parser
Branch: master
Clone or download
jackysp and coocood add write conflict error for latch (#334)
Signed-off-by: Shuaipeng Yu <jackysp@gmail.com>
Latest commit 4afa585 May 21, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Add PR and Issue templates (#166) Feb 2, 2019
ast Support load data ignore replace (#312) May 20, 2019
auth parser, ast: add `SET ROLE` support (#228) Mar 20, 2019
charset *: fix upper-cased charset and collation name (#301) Apr 29, 2019
format type/compatibility: fix show create table output of generated column (#… Apr 18, 2019
goyacc parser: add charset validation (TiDB #4436) (#220) Mar 31, 2019
model parser: add support for `ALTER DATABASE` syntax (#318) May 9, 2019
mysql add write conflict error for latch (#334) May 21, 2019
opcode parser: implement Restore for SelectStmt (#153) Jan 13, 2019
terror terror: enhance terror FastGen to gen nostack error (#326) May 15, 2019
types type/compatibility: fix show create table output of generated column (#… Apr 18, 2019
.gitignore test: enable coverage when running unit tests (#324) May 13, 2019
LICENSE Initial commit Oct 20, 2018
Makefile makefile: add fmt command in Makefile (#121) Dec 25, 2018
README.md test: enable coverage when running unit tests (#324) May 13, 2019
bench_test.go ignore hint when meet unknow token in hint (#80) Dec 21, 2018
checkout-pr-branch.sh *: add an shell script to make checkout PR branch easier (#59) Dec 3, 2018
circle.yml test: enable coverage when running unit tests (#324) May 13, 2019
consistent_test.go parser: treat `node_id` and `node_stats` as tidb keyword (#263) Mar 27, 2019
digester.go digester: avoid infinite loop when an invalid token is seen (#313) May 5, 2019
digester_test.go digester: avoid infinite loop when an invalid token is seen (#313) May 5, 2019
export_test.go update tidb dep version and fix cycle dep in test (#253) Mar 24, 2019
go.mod1 terror: enhance terror FastGen to gen nostack error (#326) May 15, 2019
go.sum1 terror: enhance terror FastGen to gen nostack error (#326) May 15, 2019
lexer.go parser: add charset validation (TiDB #4436) (#220) Mar 31, 2019
lexer_test.go parser: fix lexer that treat 9eTSs as a float (#208) Feb 14, 2019
misc.go parser: support mysql-compatible explain format (#316) May 10, 2019
parser.go Support load data ignore replace (#312) May 20, 2019
parser.y Support load data ignore replace (#312) May 20, 2019
parser_example_test.go ignore hint when meet unknow token in hint (#80) Dec 21, 2018
parser_test.go Support load data ignore replace (#312) May 20, 2019
test.sh test: enable coverage when running unit tests (#324) May 13, 2019
yy_parser.go parser: refine error messages that are inconsistent with MySQL (#273) Apr 10, 2019

README.md

Parser

Go Report Card CircleCI Status GoDoc codecov

TiDB SQL Parser

How to use it

See https://godoc.org/github.com/pingcap/parser

How to update parser for TiDB

Assuming that you want to file a PR (pull request) to TiDB, and your PR includes a change in the parser, follow these steps to update the parser in TiDB.

Step 1: Make changes in your parser repository

Fork this repository to your own account and commit the changes to your repository.

Note:

  • Don't forget to run make test before you commit!
  • Make sure parser.go is updated.

Suppose the forked repository is https://github.com/your-repo/parser.

Step 2: Make your parser changes take effect in TiDB and run CI

  1. In your TiDB repository, execute the replace instruction to make your parser changes take effect:

    GO111MODULE=on go mod edit -replace github.com/pingcap/parser=github.com/your-repo/parser@your-branch
    
  2. make dev to run CI in TiDB.

  3. File a PR to TiDB.

Step 3: Merge the PR about the parser to this repository

File a PR to this repository. Link the related PR in TiDB in your PR description or comment.

This PR will be reviewed, and if everything goes well, it will be merged.

Step 4: Update TiDB to use the latest parser

In your TiDB pull request, modify the go.mod file manually or use this command:

GO111MODULE=on go get -u github.com/pingcap/parser@master

Make sure the replace instruction is changed back to the require instruction and the version is the latest.

You can’t perform that action at this time.