Skip to content

parser : support drop sequence syntax. - #680

Merged
tangenta merged 4 commits into
pingcap:masterfrom
AilinKid:delet_sequence
Dec 16, 2019
Merged

parser : support drop sequence syntax.#680
tangenta merged 4 commits into
pingcap:masterfrom
AilinKid:delet_sequence

Conversation

@AilinKid

@AilinKidAilinKid commented Dec 15, 2019

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

TiDB are compatible with MySQL's protocol, we should be also compatible with SEQUENCE implementation of MariaDB cause MySQL is absent from it.

  •  DROP [TEMPORARY] SEQUENCE [IF EXISTS] sequence_name [, sequence_name] ...
    

Linked with sequence project, this PR try to support drop sequence syntax.

What is changed and how it works?

  • SHOW CREATE SEQUENCE sequence_name;
  • ALTER SEQUENCE [IF EXISTS] sequence_name [ INCREMENT [ BY | = ] increment ] [ MINVALUE [=] minvalue | NO MINVALUE | NOMINVALUE ] [ MAXVALUE [=] maxvalue | NO MAXVALUE | NOMAXVALUE ] [ START [ WITH | = ] start ] [ CACHE [=] cache ] [ [ NO ] CYCLE ] [ RESTART [[WITH | =] restart];
  • DROP [TEMPORARY] SEQUENCE [IF EXISTS] sequence_name [, sequence_name] ...
  • Sequence Function (need discussion)

Check List

Tests

  • Unit test
  • Integration test

@AilinKid
AilinKid requested a review from a teamDecember 15, 2019 08:57
@ghost
ghost requested review from tangenta and removed request for a teamDecember 15, 2019 08:57
@codecov

codecovBot commented Dec 15, 2019

Copy link
Copy Markdown

Codecov Report

Merging #680 into master will increase coverage by 0.3%.
The diff coverage is 75%.

Impacted file tree graph

@@ Coverage Diff @@## master #680 +/- ##
=========================================
+ Coverage 79.82% 80.13% +0.3% 
=========================================
Files 37 33 -4 Lines 13596 13030 -566 =========================================
- Hits 10853 10441 -412 + Misses 2100 1967 -133 + Partials 643 622 -21
Impacted FilesCoverage Δ
parser.go93.15% <ø> (ø)⬆️
ast/ddl.go79.67% <75%> (-0.07%)⬇️
test_driver/test_driver_helper.go
test_driver/test_driver_datum.go
test_driver/test_driver_mydecimal.go
test_driver/test_driver.go
ast/dml.go74% <0%> (+0.07%)⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d3b2972...3d21c39. Read the comment docs.

@kennytmkennytm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest LGTM

Comment threadast/ddl.go Outdated

@tangentatangenta left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@AilinKid@kennytm@tangenta