vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi I'm using a java application with mysql 4.0.2 when I issue "show processlist", I can see serveral query locked. I didn't lock query from my java code, but some query are locked.... I don't know why query are locked... What make it loked query of mysql 4.0.2 ? Any comment will help me. Have a day. |
| ||||
| Hi there. A number of reasons can lead to locked query appearence in processlist. Here's the link where mySQL locking is described in general, i guess http://dev.mysql.com/doc/refman/4.1/...ng-issues.html Other words, queries can be locked because the need resources (i.e. a single row for innodb tables and whole table fo myisam tables) which is used by someone else now. I.e. in one your session you issue mysql> select last_name, first_name from emp where emp_id = 12 for update; and then in parallel session you say update emp set department_id = 'Sales' where emp_id = '12'; Second query will wat until the first session either commited or rolled back. |