Commit f2c3b7b
committed
Fix parallel query crashes by adding NULL checks for exec_state_call_stack
In parallel workers, the exec_state_call_stack global variable is NULL
because parallel workers don't have the PL/tsql execution context.
When hooks like plsql_TriggerRecursiveCheck are called from parallel
workers during query execution, they would crash trying to dereference
the NULL pointer.
This fix adds NULL checks to:
- plsql_TriggerRecursiveCheck() in hooks.c - returns false if NULL
- find_innermost_catch_block() in err_handler.c - returns NULL if NULL
These functions are now safe to call from parallel workers and will
simply return early without accessing the exec_state_call_stack.1 parent 6ab3fe6 commit f2c3b7b
2 files changed
+12
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
432 | | - | |
433 | | - | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
434 | 441 | | |
435 | 442 | | |
436 | 443 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1687 | 1687 | | |
1688 | 1688 | | |
1689 | 1689 | | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
1690 | 1693 | | |
1691 | 1694 | | |
1692 | 1695 | | |
| |||
0 commit comments