Repository navigation
Commit ab57cde
committed
fix: walk SET, DECLARE and ASSERT expressions in StatementFeatureVisitor
The SET and DECLARE visits only reported MODIFIES_SESSION and the ASSERT
visit only READS_DATA, so the expressions these statements evaluate were
never checked: SET @x = f() and DECLARE @x INT = f() gave
mayModifyData() == false with no unresolved reference, while
SELECT f() leaves MODIFIES_DATA possible. SET now goes through the
adapter walk, DECLARE walks its initial values and ASSERT its condition.1 parent 34183f7 commit ab57cde
2 files changed
Lines changed: 29 additions & 3 deletions
File tree
- src
- main/java/net/sf/jsqlparser/statement
- test/java/net/sf/jsqlparser/statement
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
638 | 638 | | |
639 | 639 | | |
640 | 640 | | |
| 641 | + | |
641 | 642 | | |
642 | 643 | | |
643 | 644 | | |
| |||
1112 | 1113 | | |
1113 | 1114 | | |
1114 | 1115 | | |
1115 | | - | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
1116 | 1119 | | |
1117 | 1120 | | |
1118 | 1121 | | |
| |||
1147 | 1150 | | |
1148 | 1151 | | |
1149 | 1152 | | |
1150 | | - | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
1151 | 1161 | | |
1152 | 1162 | | |
1153 | 1163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
708 | 708 | | |
709 | 709 | | |
710 | 710 | | |
711 | | - | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
712 | 717 | | |
713 | 718 | | |
714 | 719 | | |
| |||
765 | 770 | | |
766 | 771 | | |
767 | 772 | | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
768 | 784 | | |
769 | 785 | | |
770 | 786 | | |
| |||
0 commit comments