*: fix the origin_default_value issue in disaggregated mode#9666
*: fix the origin_default_value issue in disaggregated mode#9666ti-chi-bot[bot] merged 7 commits intopingcap:masterfrom
origin_default_value issue in disaggregated mode#9666Conversation
origin_default_value issue in disaggregated modeorigin_default_value issue in disaggregated mode
|
PTAL @Lloyd-Pottiger |
| if (val.get<Int64>() == 0) | ||
| { | ||
| Poco::Dynamic::Var empty_val; | ||
| tidb_column_info.origin_default_value = empty_val; | ||
| break; | ||
| } |
There was a problem hiding this comment.
set tidb_column_info.origin_default_value = tipb_column_info.default_val(); if val.get<Int64>() != 0 ?
There was a problem hiding this comment.
Yes. If we don't do this, after alter table t add column col2 year not null;, we get this data is 2000 not 0000.
|
PTAL @Lloyd-Pottiger |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JaySon-Huang, Lloyd-Pottiger The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
0c22cb5 to
a81900b
Compare
|
@zimulala: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests
If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
|
In response to a cherrypick label: new pull request created to branch |
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
…#9683) close #9665 Since the TiDB add new column operation does not actually write the new column data, it simply logs it to `origin_default_value`. In disaggregated mode, the default value may be read using tipb passing the default value. The original logic is to pass the default value of tipb to the default value of ColumnInfo (calling defaultValueToField). After obtaining the default value of tipb, decode it, and then use the defaultValueToField value for processing. Signed-off-by: JaySon-Huang <tshent@qq.com> Co-authored-by: JaySon-Huang <tshent@qq.com> Co-authored-by: JaySon <tshent@qq.com>
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
|
In response to a cherrypick label: new pull request created to branch |
…#9719) close #9665 Since the TiDB add new column operation does not actually write the new column data, it simply logs it to `origin_default_value`. In disaggregated mode, the default value may be read using tipb passing the default value. The original logic is to pass the default value of tipb to the default value of ColumnInfo (calling defaultValueToField). After obtaining the default value of tipb, decode it, and then use the defaultValueToField value for processing. Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io> Signed-off-by: JaySon-Huang <tshent@qq.com> Co-authored-by: Lynn <zimu_xia@126.com> Co-authored-by: JaySon-Huang <tshent@qq.com> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
|
In response to a cherrypick label: new pull request created to branch |
…#9729) close #9665 Since the TiDB add new column operation does not actually write the new column data, it simply logs it to `origin_default_value`. In disaggregated mode, the default value may be read using tipb passing the default value. The original logic is to pass the default value of tipb to the default value of ColumnInfo (calling defaultValueToField). After obtaining the default value of tipb, decode it, and then use the defaultValueToField value for processing. Co-authored-by: Lynn <zimu_xia@126.com> Co-authored-by: Lloyd-Pottiger <60744015+Lloyd-Pottiger@users.noreply.github.com>
What problem does this PR solve?
Issue Number: close #9665
Problem Summary:
What is changed and how it works?
Check List
Tests
Before this PR:
After this PR:
Side effects
Documentation
Release note