[MDEV-14466] Negative SP variable in LIMIT is treated as big positive Created: 2017-11-22 Updated: 2023-04-27 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Prepared Statements |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.2, 10.3 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This script erroneously returns a row:
Note, if I rewrite the query using a prepared statement with a negative user variable, it correctly returns an error:
Note, If in the version 10.2 or higher (which support any kind of expressions in PS parameters) I use a prepared statement with a negative SP variable, it also correctly returns an error:
|