-
Notifications
You must be signed in to change notification settings - Fork 480
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed(PS-7745) - (Stored procedure execution fails if contains a func…
…tional index) The issue happens when checks are performed again during a query and column index of the functional index is not available. This solutiom disables some checks if a column index is not available in `pre_validate_value_generator_expr()`. It is safe because these checks were already performed during the first query that included this index in the function `validate_value_generator_expr()`.
- Loading branch information
Daniel R. Fiala
committed
Aug 28, 2022
1 parent
ab38037
commit 60b158f
Showing
3 changed files
with
39 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
CREATE PROCEDURE `sproc`() | ||
BEGIN | ||
DROP TEMPORARY TABLE IF EXISTS `t1`; | ||
CREATE TEMPORARY TABLE `t1`( | ||
`c1` INT, | ||
KEY ( ( `c1` > 0 ) ) | ||
); | ||
SELECT 1 FROM ( SELECT 1 `c2` ) `t2`; | ||
END| | ||
CALL `sproc`(); | ||
1 | ||
1 | ||
CALL `sproc`(); | ||
1 | ||
1 | ||
CALL `sproc`(); | ||
1 | ||
1 | ||
DROP PROCEDURE `sproc`; | ||
DROP TEMPORARY TABLE `t1`; |
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,18 @@ | ||
--source include/have_rocksdb.inc | ||
|
||
DELIMITER |; | ||
CREATE PROCEDURE `sproc`() | ||
BEGIN | ||
DROP TEMPORARY TABLE IF EXISTS `t1`; | ||
CREATE TEMPORARY TABLE `t1`( | ||
`c1` INT, | ||
KEY ( ( `c1` > 0 ) ) | ||
); | ||
SELECT 1 FROM ( SELECT 1 `c2` ) `t2`; | ||
END| | ||
DELIMITER ;| | ||
|
||
CALL `sproc`(); CALL `sproc`(); CALL `sproc`(); | ||
|
||
DROP PROCEDURE `sproc`; | ||
DROP TEMPORARY TABLE `t1`; |
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