Commit 8acdfc3
committed
MDEV-37713/MDEV-37714 Fold boolean literals in SELECT-list
The order of evaluation of the expressions that appear in a SELECT-list
is undefined. This change exploits this fact by recursively folding
TRUE/FALSE literals in OR/AND expressions which may allow for skipping
evaluation of some parts of the expression or even the whole expression.1 parent ef4be39 commit 8acdfc3
3 files changed
Lines changed: 58 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5736 | 5736 | | |
5737 | 5737 | | |
5738 | 5738 | | |
| 5739 | + | |
| 5740 | + | |
| 5741 | + | |
| 5742 | + | |
| 5743 | + | |
| 5744 | + | |
| 5745 | + | |
| 5746 | + | |
| 5747 | + | |
| 5748 | + | |
| 5749 | + | |
| 5750 | + | |
| 5751 | + | |
| 5752 | + | |
| 5753 | + | |
| 5754 | + | |
| 5755 | + | |
| 5756 | + | |
| 5757 | + | |
| 5758 | + | |
| 5759 | + | |
| 5760 | + | |
| 5761 | + | |
| 5762 | + | |
| 5763 | + | |
| 5764 | + | |
| 5765 | + | |
| 5766 | + | |
| 5767 | + | |
| 5768 | + | |
| 5769 | + | |
| 5770 | + | |
| 5771 | + | |
| 5772 | + | |
| 5773 | + | |
| 5774 | + | |
| 5775 | + | |
| 5776 | + | |
| 5777 | + | |
5739 | 5778 | | |
5740 | 5779 | | |
5741 | 5780 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3450 | 3450 | | |
3451 | 3451 | | |
3452 | 3452 | | |
| 3453 | + | |
3453 | 3454 | | |
3454 | 3455 | | |
3455 | 3456 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8223 | 8223 | | |
8224 | 8224 | | |
8225 | 8225 | | |
| 8226 | + | |
| 8227 | + | |
| 8228 | + | |
| 8229 | + | |
| 8230 | + | |
| 8231 | + | |
| 8232 | + | |
| 8233 | + | |
| 8234 | + | |
| 8235 | + | |
| 8236 | + | |
| 8237 | + | |
| 8238 | + | |
| 8239 | + | |
| 8240 | + | |
| 8241 | + | |
| 8242 | + | |
| 8243 | + | |
8226 | 8244 | | |
8227 | 8245 | | |
8228 | 8246 | | |
| |||
0 commit comments