[MDEV-26048] Table 'test._test_new' doesn't exist when add trigger (use pt-osc) Created: 2021-06-30 Updated: 2023-04-27 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | Data Manipulation - Insert, Storage Engine - InnoDB, Triggers |
| Affects Version/s: | 10.4.8, 10.2, 10.3, 10.4, 10.5 |
| Fix Version/s: | 10.4, 10.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | chu huaxing | Assignee: | Oleksandr Byelkin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
procedure DELIMITER $$ WHILE a < 20001 DO table use test; sql first connect1: then connect 2: then conenct 1 will error ,msg : Table 'test._test_new' doesn't exist. |
| Comments |
| Comment by chu huaxing [ 2021-06-30 ] | |||||||||||||||||||||||||||||||
|
After modification (see attachment) ,it can work without error. Will this change cause other problems? | |||||||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2021-06-30 ] | |||||||||||||||||||||||||||||||
|
Thank you! I repeated this behavior on 10.2-10.6
| |||||||||||||||||||||||||||||||
| Comment by chu huaxing [ 2021-07-01 ] | |||||||||||||||||||||||||||||||
|
Thank you for your reply. If I change it as shown in the attachment, will there be any other problems that I didn't notice? | |||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2021-08-07 ] | |||||||||||||||||||||||||||||||
|
pull request: https://github.com/MariaDB/server/pull/1872 | |||||||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2021-10-27 ] | |||||||||||||||||||||||||||||||
|
It looks like something not good here with MDL lock. it is allowed to change table (add/remove) triggers while the procedure which uses the table is running. But each lock taken for each statement only. Other solution is to re-compile each statement when table changed (related to | |||||||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2021-10-27 ] | |||||||||||||||||||||||||||||||
|
IMHO it is a part of bigger problem (this also lead to SP endet with an error):
| |||||||||||||||||||||||||||||||
| Comment by chu huaxing [ 2021-10-28 ] | |||||||||||||||||||||||||||||||
|
For alter table t1 drop column key2, the SP will report an error (Column count does not match value count at row 1), I think it’s okay, because the table struct has changed and key2 has been deleted. |