[MDEV-33324] insert ... select from joins hangs or result in 1206: The total number of locks exceeds the lock table size Created: 2024-01-29 Updated: 2024-01-30 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Locking, Optimizer, Storage Engine - InnoDB |
| Affects Version/s: | 10.4, 10.5 |
| Fix Version/s: | 10.4, 10.5 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Yuchen Pei | Assignee: | Yuchen Pei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
Splitted from MDEV-28804. Run the following test with --innodb_buffer_pool_size=5m, in a build of CMAKE_BUILD_TYPE=RelWithDebInfo and WITH_DBUG_TRACE:BOOL=OFF.
It either hangs or results in 1206: The total number of locks exceeds the lock table size. See marko's comment for some initial analysis and hint: |
| Comments |
| Comment by Roel Van de Paar [ 2024-01-29 ] |
|
Please see MDEV-28803 |
| Comment by Yuchen Pei [ 2024-01-29 ] |
|
marko, what do you think is the relation between this bug and MDEV-28803, as Roel mentioned above? I notice that one difference is that MDEV-28803 is for 10.6+, but this one is at least 10.4, 10.5 but potentially also other versions (pending testing). And of course, this one results in hang or 1206, but MDEV-28803 only results in 1206 |
| Comment by Marko Mäkelä [ 2024-01-29 ] |
|
I think that MDEV-28803 and MDEV-28804 had already filed for the same root cause, which is that an excessive number of explicit record lock objects is being created during INSERT…SELECT when the target table also occurs in a Cartesian product of the source. I posted some analysis of this in MDEV-28804. The main difference between MDEV-28803 and this one seems to be explained by MDEV-28805. |
| Comment by Yuchen Pei [ 2024-01-29 ] |
|
Got it marko. Now that we have a reproducible case for MDEV-28804 I've blocked this one with that one. Will work on that one first. |