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

executor: raise error when text data is too long #33345

Merged
merged 7 commits into from
Mar 26, 2022
Merged

executor: raise error when text data is too long #33345

merged 7 commits into from
Mar 26, 2022

Conversation

Jasonysli
Copy link
Contributor

@Jasonysli Jasonysli commented Mar 23, 2022

fix #32601

What problem does this PR solve?

#32601

Issue Number: 32601
datum.pkg was changed.

Problem Summary:

What is changed and how it works?

1.Under strict sql_mode, raise error when blob,text data is too long;
2.Under non-strict sql_mode, truncate the data when data is too long instead of error;

Check List

Tests

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

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

To be compatible with MySQL, TiDB raise an error, when data is too long for  tinytext, text, mediumtext, longtext. 
#32601

Issue Number: close #32601

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Mar 23, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • bb7133
  • tangenta

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. labels Mar 23, 2022
@CLAassistant
Copy link

CLAassistant commented Mar 23, 2022

CLA assistant check
All committers have signed the CLA.

@ti-chi-bot ti-chi-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 23, 2022
@sre-bot
Copy link
Contributor

sre-bot commented Mar 23, 2022

Please follow PR Title Format:

  • pkg [, pkg2, pkg3]: what is changed

Or if the count of mainly changed packages are more than 3, use

  • *: what is changed

After you have format title, you can leave a comment /run-check_title to recheck it

@sre-bot
Copy link
Contributor

sre-bot commented Mar 23, 2022

@Jasonysli Jasonysli changed the title Fix issue:https://github.com/pingcap/tidb/issues/32601 Raise error when data is too long #32601 Mar 23, 2022
@Jasonysli Jasonysli changed the title Raise error when data is too long #32601 Raise error when data is too long. Mar 23, 2022
@bb7133
Copy link
Member

bb7133 commented Mar 23, 2022

@Jasonysli the title should be formatted: https://ci.pingcap.net/blue/organizations/jenkins/tidb_check_title/detail/tidb_check_title/49256/pipeline

I've updated it for you, FYI.

@bb7133 bb7133 changed the title Raise error when data is too long. executor: raise error when text data is too long. Mar 23, 2022
expression/builtin_string.go Show resolved Hide resolved
types/datum.go Show resolved Hide resolved
types/datum.go Show resolved Hide resolved
types/datum.go Outdated Show resolved Hide resolved
Copy link
Member

@bb7133 bb7133 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot added status/LGT1 Indicates that a PR has LGTM 1. and removed do-not-merge/needs-linked-issue labels Mar 23, 2022
@djshow832 djshow832 added compatibility-breaker Violation of forwards/backwards compatibility in a design-time piece. and removed needs-cherry-pick-release-5.1 needs-cherry-pick-release-5.2 needs-cherry-pick-release-5.3 Type: Need cherry pick to release-5.3 needs-cherry-pick-release-5.4 Should cherry pick this PR to release-5.4 branch. needs-cherry-pick-6.0 labels Mar 24, 2022
@djshow832
Copy link
Contributor

This is a compatibility breaker, so I added the label and updated the checklist.
Besides, I don't think it's necessary to cherry-pick it into previous versions, so I removed the labels.

@djshow832
Copy link
Contributor

Please write a release note. Rest LGTM.

@ti-chi-bot ti-chi-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Mar 25, 2022
@tangenta
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

@tangenta: /merge in this pull request requires 2 approval(s).

In response to this:

/merge

Instructions 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.

@tangenta tangenta changed the title executor: raise error when text data is too long. executor: raise error when text data is too long Mar 25, 2022
@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Mar 25, 2022
@hawkingrei
Copy link
Member

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 0a726f6

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 26, 2022
@ti-chi-bot
Copy link
Member

@Jasonysli: 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.

Instructions 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.

@ti-chi-bot ti-chi-bot merged commit f012766 into pingcap:master Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility-breaker Violation of forwards/backwards compatibility in a design-time piece. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TiDB doesn't raise an error when data is too long
8 participants