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

copy: fix vectorized copy for INT2 and INT4 #102298

Merged
merged 1 commit into from
Apr 26, 2023

Conversation

yuzefovich
Copy link
Member

This commit fixes a recently introduced bug where we forgot to implement the special behavior in the vec handler for INT2 and INT4 types which would then could lead to a runtime crash if such a type is used in the schema. Int types are special because the vectorized engine handles them precisely (i.e. it uses int16, int32, and int64 accordingly) whereas the row engine always internally defaults to int64.

Fixes: #102181.

Release note (bug fix): In alpha and beta 23.1.0 releases CockroachDB could crash when evaluating COPY command in some cases when the schema had INT2 and / or INT4 type, and this is now fixed.

This commit fixes a recently introduced bug where we forgot to implement
the special behavior in the vec handler for INT2 and INT4 types which
would then could lead to a runtime crash if such a type is used in the
schema. Int types are special because the vectorized engine handles them
precisely (i.e. it uses int16, int32, and int64 accordingly) whereas the
row engine always internally defaults to int64.

Release note (bug fix): In alpha and beta 23.1.0 releases CockroachDB
could crash when evaluating COPY command in some cases when the schema
had INT2 and / or INT4 type, and this is now fixed.
@yuzefovich yuzefovich added backport-23.1.x Flags PRs that need to be backported to 23.1 backport-23.1.0 labels Apr 26, 2023
@yuzefovich yuzefovich requested review from a team as code owners April 26, 2023 01:08
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@DrewKimball DrewKimball left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @mgartner)

@yuzefovich
Copy link
Member Author

TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented Apr 26, 2023

Build succeeded:

@cucaroach
Copy link
Contributor

Thanks Yahor! Weird that the randgen test didn't catch this, I'll create an issue to figure out why.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-23.1.x Flags PRs that need to be backported to 23.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sql: v23.1.0-beta.2: incorrect int type used in copy
4 participants