Skip to content

parser : support drop sequence syntax.#680

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

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

Conversation

@AilinKid
Copy link
Contributor

@AilinKid AilinKid commented Dec 15, 2019

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 team December 15, 2019 08:57
@ghost ghost requested review from tangenta and removed request for a team December 15, 2019 08:57
@AilinKid AilinKid requested a review from kennytm December 15, 2019 08:59
@codecov
Copy link

codecov bot commented Dec 15, 2019

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 Files Coverage Δ
parser.go 93.15% <ø> (ø) ⬆️
ast/ddl.go 79.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.go 74% <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.

Copy link
Contributor

@kennytm kennytm left a comment

Choose a reason for hiding this comment

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

Rest LGTM

@kennytm kennytm added the status/LGT1 LGT1 label Dec 16, 2019
Copy link
Contributor

@tangenta tangenta left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to 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