-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BugFix] Fix Expr::open crash when evaluate const throw exception (#5…
- Loading branch information
1 parent
3c04b18
commit 1d3a736
Showing
3 changed files
with
24 additions
and
1 deletion.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
-- name: test_number_overflow | ||
set sql_mode="ERROR_IF_OVERFLOW"; | ||
-- result: | ||
-- !result | ||
select cast(abs(1234567890123456789) as decimal(4,3)); | ||
-- result: | ||
[REGEX].*Expr evaluate meet error: The type cast from other types to decimal overflows.* | ||
-- !result | ||
select 1 in (cast(abs(1234567890123456789) as decimal(4,3)), cast(abs(1234567890123456789) as decimal(4,3))); | ||
-- result: | ||
[REGEX].*Expr evaluate meet error: The type cast from other types to decimal overflows.* | ||
-- !result |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- name: test_number_overflow | ||
set sql_mode="ERROR_IF_OVERFLOW"; | ||
|
||
-- exception in evaluate | ||
select cast(abs(1234567890123456789) as decimal(4,3)); | ||
-- exception in open | ||
select 1 in (cast(abs(1234567890123456789) as decimal(4,3)), cast(abs(1234567890123456789) as decimal(4,3))); |