[MDEV-4640] A metadata lock never dies Created: 2013-06-11 Updated: 2013-06-12 Resolved: 2013-06-12 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Federico Razzoli | Assignee: | Elena Stepanova |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Description |
|
1) Open a console and run:
2) Open ANOTHER console and run:
3) Go back to the first console, and run:
Everything freezes. Then I ask for a processlist using the second console:
This always happens with 5.5.30 and 10.0.2 on WinXP. Didn't try Linux or older Maria versions. Happens with both functions and procedures. |
| Comments |
| Comment by Elena Stepanova [ 2013-06-11 ] |
|
Hi Federico, It would normally happen if you have AUTOCOMMIT=0 in your second connection (the one that does SELECT). Is it the case? It can be somewhere in config files, options, etc. |
| Comment by Federico Razzoli [ 2013-06-11 ] |
|
Hi Elena, |
| Comment by Elena Stepanova [ 2013-06-11 ] |
|
No, you aren't missing anything, it's yet another side-effect of the new metadata-locking system introduced in 5.5 (MySQL 5.5.3, if I remember correctly). Basically, the objects are now locked for the duration of the transaction, even if the objects themselves are not "transactional" (e.g. it would happen with a MyISAM table as well). It's been discussed with authors of the MDL, for example here: http://lists.mysql.com/internals/38583. If you want to resume the discussion, please feel free to do so. Please note that the lock is not "eternal", it does have a timeout (lock_wait_timeout, it's just that the default value for the timeout is 1 YEAR. You can reduce it in your config file to any value down to 1 sec, to get rid of the "hang"; but of course the behavior will still be not the same as it was before, the DDL operation will fail with the timeout. |
| Comment by Elena Stepanova [ 2013-06-12 ] |
|
Closing as not a bug, please comment to re-open if the explanation is not satisfactory. |