Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is there a mutex around 'checking permissions' and 'open tables' code in mysql 5.1/xtradb 6?

Tags:

mysql

xtradb

question comes up from some behavior i'm seeing.

we're using mysql 5.1.36, xtradb release 6 on an 8 core box. when dropping a database with a lot of tables, mysql takes a long time to check permissions for each table before dropping them. i understand this to be normal behavior, at least with recent versions of mysql. however, when doing this, all other queries on the database are blocking in the 'open table' state. top shows that 1 of the cores is pegged at 100%, and the other cores are not doing anything.

is this expected behavior? is there a mutex around the checking permissions and opening tables code?

thanks!

like image 489
Evan Pon Avatar asked Nov 15 '22 11:11

Evan Pon


1 Answers

Yes, there is a mutex around opening/closing tables: http://www.mysqlperformanceblog.com/2009/06/16/slow-drop-table/

like image 100
Morgan Tocker Avatar answered Dec 10 '22 05:12

Morgan Tocker