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

bug: Create table Primary key set AUTO_INCREMENT missing data in a certain case. #1072

Closed
3 tasks done
nangong007 opened this issue Dec 6, 2022 · 3 comments
Closed
3 tasks done
Assignees
Labels
A-bug Something isn't working

Comments

@nangong007
Copy link

nangong007 commented Dec 6, 2022

Have you read the Contributing Guidelines on issues?

Please confirm if bug report does NOT exists already ?

  • I confirm there is no existing issue for this

Describe the problem

when set global tianmu_insert_delayed =ON,innodb_autoinc_lock_mode=1 ; and update primary key manually to a new value. Then will missing a row.

For example:
CREATE TABLE:
CREATE TABLE employees (
emp_no INT AUTO_INCREMENT PRIMARY KEY,
first_name VARCHAR(50),
last_name VARCHAR(50)
);
INSERT INTO employees(first_name,last_name)
VALUES('John','Doe'),
('Mary','Jane');

UPDATE employees
SET
first_name = 'Joe',
emp_no = 5
WHERE
emp_no = 2;

INSERT INTO employees(first_name,last_name)
VALUES('Wang2','Lee');
INSERT INTO employees(first_name,last_name)
VALUES('Wang3','Lee');
INSERT INTO employees(first_name,last_name)
VALUES('Wang4','Lee');
INSERT INTO employees(first_name,last_name)
VALUES('Wang5','Lee');
INSERT INTO employees(first_name,last_name)
VALUES('Wang6','Lee');

Result:
The row where first_name='Wang5' is missing

expecting:

The row where first_name='Wang5' should exist in table.

Expected behavior

No row missing

How To Reproduce

No response

Environment

No response

Are you interested in submitting a PR to solve the problem?

  • Yes, I will!
@nangong007 nangong007 added the A-bug Something isn't working label Dec 6, 2022
@nangong007 nangong007 changed the title bug: Create table Primary key set AUTO_INCREMENT missing data In a certain case. bug: Create table Primary key set AUTO_INCREMENT missing data in a certain case. Dec 6, 2022
@isredstar isredstar self-assigned this Dec 6, 2022
@isredstar
Copy link
Collaborator

ACK

@isredstar
Copy link
Collaborator

void ha_tianmu::update_create_info([[maybe_unused]] HA_CREATE_INFO *create_info) {} is not implemented

@RingsC
Copy link
Contributor

RingsC commented Mar 5, 2023

fix by #1315

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants