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: doUpdate cnt error #11

Closed
rsy56640 opened this issue May 17, 2019 · 2 comments
Closed

BUG: doUpdate cnt error #11

rsy56640 opened this issue May 17, 2019 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@rsy56640
Copy link
Owner

xjbDB/code/src/vm.cpp

Lines 592 to 598 in 6239a5d

if (targets[k].fk) {
int32_t old_i = page::get_range_INT(vEntry, targets[k].range);
if (!table_pk_ref_INT[targets[k].fk_table].count(i))
ok_to_update = false;
else {
if (i != old_i)
diff_num++;

xjbDB/code/src/vm.cpp

Lines 610 to 616 in 6239a5d

if (targets[k].fk) {
std::string old_s = page::get_range_VARCHAR(vEntry, targets[k].range);
if (!table_pk_ref_VARCHAR[targets[k].fk_table].count(s))
ok_to_update = false;
else {
if (s != old_s)
diff_num++;

if (i != old_i)
    diff_num++;

comparision between i and old_i should be moved to the outside of FK check.

@rsy56640 rsy56640 added the bug Something isn't working label May 17, 2019
@rsy56640 rsy56640 self-assigned this May 17, 2019
@rsy56640
Copy link
Owner Author

cause: 6239a5d

@rsy56640
Copy link
Owner Author

fixed: 1718dad in branch /tree/presentation-opt

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

No branches or pull requests

1 participant