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

insert NULL on duplicate key update val bug. #4884

Closed
winkyao opened this issue Oct 25, 2017 · 0 comments · Fixed by #4891
Closed

insert NULL on duplicate key update val bug. #4884

winkyao opened this issue Oct 25, 2017 · 0 comments · Fixed by #4891
Assignees
Labels
type/bug The issue is confirmed as a bug.
Milestone

Comments

@winkyao
Copy link
Contributor

winkyao commented Oct 25, 2017

Please answer these questions before submitting your issue. Thanks!

drop table if exists test;
create table test(id int not null, val text, primary key(id));
insert into test values(1,'hello');
insert into test values(1, NULL) on duplicate key update val = VALUES(val);
select * from test; 
-- WRONG ANSWER: 1, ''
-- EXPECTED: 1, NULL 

select tidb_version();

Release Version: 1.0.0
Git Commit Hash: 1a175b562bc679694f606c336131a9373064b324
Git Branch: release-1.0
UTC Build Time: 2017-10-19 02:38:02
@winkyao winkyao added the type/bug The issue is confirmed as a bug. label Oct 25, 2017
@winkyao winkyao self-assigned this Oct 25, 2017
@zz-jason zz-jason added this to the 1.1 milestone Oct 25, 2017
coocood pushed a commit that referenced this issue Oct 25, 2017
…values function (#4891) (#4894)

* expression: fix #4884, insert NULL on duplicate key by values function (#4891)

* fix ci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants