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

fix(tianmu):The mysqld is crashed when you are starting replication.(#1523) #1540

Merged
merged 2 commits into from
Apr 11, 2023

Conversation

konghaiya
Copy link
Collaborator

@konghaiya konghaiya commented Apr 10, 2023

It is possible to update null values with null values in the delta layer, For example:
update t set name="xiaohua" where id=1;
update t set name=null where id=1;
So when encountering this situation, directly return

Summary about this PR

Issue Number: close #1523

Tests Check List

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Changelog

  • New Feature
  • Bug Fix
  • Performance Improvement
  • Build/Testing/CI/CD
  • Documentation
  • Not for changelog (changelog entry is not required)

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features

@konghaiya konghaiya self-assigned this Apr 10, 2023
@mergify
Copy link
Contributor

mergify bot commented Apr 10, 2023

Thanks for the contribution!
I have applied any labels matching special text in your PR Changelog.

Please review the labels and make any necessary changes.

@mergify mergify bot added the PR-bug bug for pull request label Apr 10, 2023
@codecov
Copy link

codecov bot commented Apr 10, 2023

Codecov Report

Patch coverage: 86.36% and project coverage change: +0.04 🎉

Comparison is base (e7bbe88) 45.00% compared to head (dab88c8) 45.05%.

Additional details and impacted files
@@                 Coverage Diff                 @@
##           stonedb-5.7-dev    #1540      +/-   ##
===================================================
+ Coverage            45.00%   45.05%   +0.04%     
===================================================
  Files                 1999     1999              
  Lines               413913   413901      -12     
===================================================
+ Hits                186283   186484     +201     
+ Misses              227630   227417     -213     
Impacted Files Coverage Δ
storage/tianmu/core/column_share.cpp 85.60% <ø> (ø)
storage/tianmu/core/pack.h 85.10% <ø> (ø)
storage/tianmu/core/parallel_hash_join.cpp 0.62% <ø> (+<0.01%) ⬆️
storage/tianmu/core/tianmu_attr.h 73.62% <ø> (ø)
storage/tianmu/core/pack.cpp 62.26% <75.00%> (+1.47%) ⬆️
storage/tianmu/core/tianmu_table.cpp 67.22% <76.47%> (+20.52%) ⬆️
storage/tianmu/core/pack_str.cpp 65.94% <88.88%> (+2.01%) ⬆️
storage/tianmu/core/engine.cpp 63.85% <100.00%> (+12.53%) ⬆️
storage/tianmu/core/pack_int.cpp 70.48% <100.00%> (+0.61%) ⬆️
storage/tianmu/core/tianmu_attr.cpp 74.04% <100.00%> (+4.49%) ⬆️

... and 121 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

…toneatom#1523)

It is possible to update null values with null values in the delta layer,
For example:
update t set name="xiaohua" where id=1;
update t set name=null where id=1;
So when encountering this situation, directly return
Value row_val = row.second;
if (ct.Lookup() && row_val.HasValue()) {
auto &str = row_val.GetString();
std::shared_ptr<Value> row_val = row.second;
Copy link
Collaborator

Choose a reason for hiding this comment

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

why use shared_ptr here? please add some comments.

@@ -1168,10 +1162,6 @@ void TianmuAttr::DeleteData(uint64_t row) {
CopyPackForWrite(pn);
auto &dpn = get_dpn(pn);
auto dpn_save = dpn;
if (dpn.Trivial()) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

why remove this check?

@@ -209,30 +209,10 @@ class DelayedInsertParser final {
ptr += str_len;
} break;
case common::PackType::INT: {
if (attr->Type().Lookup()) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

why not check the Lookup() ?

@mergify mergify bot merged commit 44d6ff8 into stoneatom:stonedb-5.7-dev Apr 11, 2023
@konghaiya konghaiya deleted the dev_lhj_1523 branch April 18, 2023 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-bug bug for pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: The mysqld is crashed when you are starting replication.
4 participants