List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:May 22 1999 8:45am
Subject:spontaneous locking?
View as plain text  
Hi!

>>>>> "Piet" == Piet Wesselman <pwessel@stripped> writes:

Piet> Hi,
Piet> I have a table aut_book like this:

Piet> +----------+---------------------+------+-----+---------+-------+
Piet> | Field    | Type                | Null | Key | Default | Extra |
Piet> +----------+---------------------+------+-----+---------+-------+
Piet> | name_id  | bigint(20) unsigned |      | MUL | 0       |       |
Piet> | rec_nr   | bigint(20) unsigned |      | MUL | 0       |       |
Piet> | owner_id | char(3)             |      | MUL |         |       |
Piet> +----------+---------------------+------+-----+---------+-------+

Piet> when querying: delete from aut_book where owner_id='arc'  the process seemed to
> hang. So I did:

mysql> show processlist\g
Piet>
> +--------+-----+-------+-----+---------+------+--------+-------------------------------------------+
Piet> | Id     | xxx | Host  | xxx | Command | Time | State  | Info                    
>                  |
Piet>
> +--------+-----+-------+-----+---------+------+--------+-------------------------------------------+
Piet> | 203988 | xxx | dusty | xxx | Query   | 310  | Locked | delete from aut_book
> where owner_id='arc' |
Piet> | 204160 | xxx | dusty | xxx | Query   | 0    | NULL   | show processlist        
>                  |
Piet>
> +--------+-----------+-------+-----------+---------+------+--------+--------------------

Piet> How can this happen? I didn't lock any table. This has happened to me before.
> When I killed the process it still showed up in the processlist as 'Killed' and finally
> Mysql broke on 'too many users'

Piet> I have Mysql 3.22.21, Linux Redhat 5.2

Was the above the whole processlist?
Wasn't there any other threads running while you did the above query.
The above looks like a bug in the locking handling, but I am not aware 
of any such bug in 3.22.21.
Can you try to reproduce this somehow ?
(The fork_test* scripts may help you do this)

Regards,
Monty

PS:  Sorry for the late reply;  Until 1999-06-01 (when we come back
     from USA), my replies may be a bit delayed.

Thread
spontaneous locking?Piet Wesselman17 May
  • spontaneous locking?Michael Widenius22 May
  • spontaneous locking?Michael Widenius22 May