forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
121904: colexec: fix evaluation of the IN expression with INT2 and INT4 types r=yuzefovich a=yuzefovich This commit fixes a possible incorrect result of evaluation of the IN expression where the left side is INT2 or INT4 type and the right side has integers outside of the range of the left side's type. We do so by upcasting the "filter" row to INT8. Note that we already do the appropriate upcast in the comparison function, so the incorrect results could only be produced due to the "filter row" no longer being sorted in case a value overflows. Fixes: cockroachdb#102864. Release note (bug fix): CockroachDB could previously incorrectly evaluate IN expressions that had INT2 or INT4 type on the left side and values outside of the range of the left side on the right side. The bug has been present since at least 21.1 and is now fixed. Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
- Loading branch information
Showing
4 changed files
with
40 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters