Hello.
In my opinion, it is just for some statistics. The variable locks_immediate (which corresponds to Table_locks_immediate) is incremented very often in mysys/thr_lock.c in this way: statistic_increment(locks_immediate,&THR_LOCK_lock); lee wrote: > Why would a simple select against an innodb db result in a bump of the > table_locks_immediate variable? I've been debugging a different problem and I > noticed this behavior. I don't believe it is a problem but can't explain the > behavor and it seems odd. > > Regards, > Lee > > mysql> create table test (a char(1)) engine=innodb; > Query OK, 0 rows affected (0.14 sec) > > mysql> flush status; > Query OK, 0 rows affected (0.07 sec) > > mysql> show status like 'table_lock%'; > +-----------------------+-------+ > | Variable_name | Value | > +-----------------------+-------+ > | Table_locks_immediate | 0 | > | Table_locks_waited | 0 | > +-----------------------+-------+ > 2 rows in set (0.07 sec) > > mysql> select count(*) from test; > +----------+ > | count(*) | > +----------+ > | 0 | > +----------+ > 1 row in set (0.07 sec) > > mysql> show status like 'table_lock%'; > +-----------------------+-------+ > | Variable_name | Value | > +-----------------------+-------+ > | Table_locks_immediate | 1 | > | Table_locks_waited | 0 | > +-----------------------+-------+ > 2 rows in set (0.07 sec) > > -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]