US 12,111,828 B2
Method and system to implement error handling with fine-grained SQL hints
Krishna Kantikiran Pasupuleti, Belmont, CA (US); Mohamed Ziauddin, Pleasanton, CA (US); Hong Su, Belmont, CA (US); and Sunil P. Chakkappen, Foster City, CA (US)
Assigned to Oracle International Corporation, Redwood Shores (CA)
Filed by Oracle International Corporation, Redwood Shores, CA (US)
Filed on Oct. 15, 2021, as Appl. No. 17/451,047.
Prior Publication US 2023/0117461 A1, Apr. 20, 2023
Int. Cl. G06F 16/24 (2019.01); G06F 16/2453 (2019.01)
CPC G06F 16/2453 (2019.01) 30 Claims
OG exemplary drawing
 
1. A method, comprising:
performing a compilation on a database query at a database server to transform at least a first query block and a second query block in the database query; and
in response to the compilation on the database query,
detecting an error that occurred during the compilation of the database query;
upon detection of the error, determining a transformation which, when applied to the second query block during the compilation, causes the database server to produce the error during the compilation;
determining an identifier for the second query block that causes the error during the compilation;
generating a negative hint that is specific to a specific combination of the second query block and the transformation by including into the negative hint at least the identifier and information pertaining to the transformation that produces the error when applied to the second query block having the identifier during the compilation; and
avoiding subsequent occurrence of the error during a subsequent compilation on the second query block at least by using the negative hint to prevent the transformation from being applied to one or more query blocks comprising the identifier during the subsequent compilation, wherein the subsequent compilation transforms the first query block.