Commit 2b64f60
committed
MSSQL: support EXEC (@SQL) dynamic SQL execution
parse_execute() was consuming a second parameter list after already
parsing the parenthesised name expression, causing parse failures on
any token that immediately followed EXEC (@SQL).
Fixed by tracking whether the name was itself wrapped in parens; when it
is, skip the parameter-list scan and leave no tokens consumed for the
caller to mis-interpret.
Adds test_exec_dynamic_sql covering both the standalone form and the
case where a subsequent statement follows on the next line.1 parent e81eb14 commit 2b64f60
2 files changed
Lines changed: 43 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18536 | 18536 | | |
18537 | 18537 | | |
18538 | 18538 | | |
| 18539 | + | |
| 18540 | + | |
| 18541 | + | |
18539 | 18542 | | |
18540 | 18543 | | |
18541 | 18544 | | |
| |||
18546 | 18549 | | |
18547 | 18550 | | |
18548 | 18551 | | |
18549 | | - | |
| 18552 | + | |
18550 | 18553 | | |
18551 | 18554 | | |
18552 | | - | |
| 18555 | + | |
| 18556 | + | |
| 18557 | + | |
| 18558 | + | |
| 18559 | + | |
| 18560 | + | |
| 18561 | + | |
| 18562 | + | |
| 18563 | + | |
18553 | 18564 | | |
18554 | 18565 | | |
18555 | 18566 | | |
| |||
18559 | 18570 | | |
18560 | 18571 | | |
18561 | 18572 | | |
18562 | | - | |
| 18573 | + | |
| 18574 | + | |
| 18575 | + | |
| 18576 | + | |
| 18577 | + | |
18563 | 18578 | | |
18564 | 18579 | | |
18565 | 18580 | | |
18566 | 18581 | | |
18567 | 18582 | | |
| 18583 | + | |
| 18584 | + | |
18568 | 18585 | | |
18569 | 18586 | | |
18570 | 18587 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2730 | 2730 | | |
2731 | 2731 | | |
2732 | 2732 | | |
| 2733 | + | |
| 2734 | + | |
| 2735 | + | |
| 2736 | + | |
| 2737 | + | |
| 2738 | + | |
| 2739 | + | |
| 2740 | + | |
| 2741 | + | |
| 2742 | + | |
| 2743 | + | |
| 2744 | + | |
| 2745 | + | |
| 2746 | + | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
| 2752 | + | |
| 2753 | + | |
| 2754 | + | |
| 2755 | + | |
0 commit comments