-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
server: make long-data type no longer check nullBitmap #7573
Conversation
/run-all-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we construct any test cases for this?
@XuHuaiyu yes, I will do it. |
/run-all-tests tidb-test=pr/615 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a unit test.
server/conn_stmt.go
Outdated
if boundParams[i] != nil { | ||
args[i] = boundParams[i] | ||
continue | ||
} | ||
|
||
if nullBitmap[i>>3]&(1<<(uint(i)%8)) > 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comment for the modification.
@zhexuany https://github.com/pingcap/tidb-test/pull/615 integration test is enough, fake byte array ut is meanless and hard maintain. |
Gotcha. |
LGTM |
What problem does this PR solve?
fixes #7572
mariadb send none zero value in nullBitmap, tidb follow protocol docs to check nullBitmap and got nul value
but after experiment and check code,
nullBitmap
is nouse forLONG_DATA_VALUE
(and it's NULL value seem be magic), so we need skip them, and make mariadb client user work.What is changed and how it works?
if param is long_data_value then skip nullBitmap check.
Check List
use mariadb client can reproduce it, after this PR fixed.
Code changes
Side effects
Related changes
This change is