title: Select query locks innodb table
body: <p>I am doing a very simple select from a table like</p>
  
  <pre><code>SELECT column FROM table WHERE id=5;
  </code></pre>
  
  <p>id is a primary key and all the tables are using innodb.</p>
  
  <p>When I enable profiling in phpmyadmin and run this query I see this : </p>
  
  <pre><code>Status                           Time
  starting                         0.000025
  checking query cache for query   0.000034
  checking permissions             0.000004
  Opening tables                   0.000022
  System lock                      0.000004
  Table lock                       0.000022
  init                             0.000016
  optimizing                       0.000008
  statistics                       0.000030
  preparing                        0.000022
  executing                        0.000003
  Sending data                     0.000009
  end                              0.000002
  query end                        0.000003
  freeing items                    0.000061
  storing result in query cache    0.000005
  logging slow query               0.000002
  cleaning up                      0.000002
  </code></pre>
  
  <p>The second time I run the same query I get this since the query is cached: </p>
  
  <pre><code>Status                           Time
  starting                         0.000022
  checking query cache for query   0.000005
  checking privileges on cached    0.000003
  checking permissions             0.000020
  sending cached result to clien   0.000055
  logging slow query               0.000002
  cleaning up                      0.000002
  </code></pre>
  
  <p>Why is a simple select query like this locking the table?</p>