[MDEV-17388] Variables in Subquery gives wrong result Created: 2018-10-08 Updated: 2018-10-09 Resolved: 2018-10-09 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.1.26, 10.3.10, 10.2, 10.3 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Dominic Blattmann | Assignee: | Alice Sherepa |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Debian stretch 9.5 |
||
| Attachments: |
|
| Description |
|
Following problem i've encountered after upgrading from MySql 5.1.73 (Where it does not happen) to 10.1.26. I've done the upgrade to 10.3.10 where it still behaves unexpected.
I assume there is some optimization for the subquery going wrong. |
| Comments |
| Comment by Alice Sherepa [ 2018-10-08 ] | |||||||||||||||||||||||||||||||||||||
|
Could you please add your .cnf file(s), I can not reproduce this behavior with the delault configuration (tried 10.1.26, 10.3)
| |||||||||||||||||||||||||||||||||||||
| Comment by Dominic Blattmann [ 2018-10-08 ] | |||||||||||||||||||||||||||||||||||||
|
Attached, but it is complete clean fresh installation, only change made to enable remote access. | |||||||||||||||||||||||||||||||||||||
| Comment by Dominic Blattmann [ 2018-10-08 ] | |||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2018-10-08 ] | |||||||||||||||||||||||||||||||||||||
|
Thanks a lot, now I can reproduce it, on MariaDB 5.5-10.3
| |||||||||||||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2018-10-09 ] | |||||||||||||||||||||||||||||||||||||
|
According to KB "It is unsafe to read a user-defined variable and set its value in the same statement (unless the command is SET), because the order of these actions is undefined.", https://mariadb.com/kb/en/library/user-defined-variables/, so it is not considered as a bug. |