[MDEV-18507] can't update temporary table when joined with table with triggers on read-only Created: 2019-02-07 Updated: 2020-11-01 Resolved: 2019-04-24 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Manipulation - Update |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.1.37, 10.1.38, 10.2, 10.3, 10.4 |
| Fix Version/s: | 10.2.24, 5.5.64, 10.1.39, 10.3.15, 10.4.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Talbot McInnis | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
CentOS |
||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Very similar to an old mySQL bug (https://bugs.mysql.com/bug.php?id=86163), you will get an error about read only when executing an update statement against a temp table if that table is joined to non-temp tables, even though the targetting columns are all in the temporary table. Borrowing the example from that bug report:
|
| Comments |
| Comment by Talbot McInnis [ 2019-02-07 ] | |||||||||||||||||||||||||||
|
This issue has been present in several past versions, and to date we have been able to work around it by manipulating our queries but we hit one where all workarounds incur a significant performance penalty. We have disabled read_only for now but we are at risk until this can be fixed so we can turn on read-only again. | |||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2019-02-11 ] | |||||||||||||||||||||||||||
|
Thanks a lot for the report!
| |||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2019-04-05 ] | |||||||||||||||||||||||||||
|
See these commits in bb-5.5-serg:
As usual, "cleanup" does not change the behavior, just rearranging code. "bugfix" fixes a related bug, and includes changes needed for |