Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-increment column generates same values with global sequence #1

Closed
actiontech-bot opened this issue Aug 24, 2017 · 1 comment
Closed

Comments

@actiontech-bot
Copy link
Member

actiontech-bot commented Aug 24, 2017

Raised by: @zhunina
Steps:

  1. Create a table:
    create table sbtest1(id int,name varchar(8),p_id int primary key auto_increment);
  2. Make 4 shardings, whose sharding column is id
  3. Make a global sequence
GLOBAL.HISIDS=
GLOBAL.MINID=10001
GLOBAL.MAXID=20000
GLOBAL.CURID=10000
  1. Query insert into sbtest1(id,name,p_id) values(1,'a',next value for MYCATSEQ_GLOBAL);
    returns (1,‘a’,10001)
  2. Query insert into sbtest1(id,name,p_id) values(2,'a',next value for MYCATSEQ_GLOBAL),(3,'a',next value for MYCATSEQ_GLOBAL),(4,'a',next value for MYCATSEQ_GLOBAL);
    returns (2,'a',10002),(3,'a',10002),(4,'a',10002), which is not correct

Expectation:

Step 5 should give increment values of global sequence.

@zhunina
Copy link

zhunina commented Sep 25, 2017

Fixed
This type of sequence has been changed to timestamp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants