"The total number of locks exceeds the lock table size" Deleting 267 Records

innodb, locking, mysql, sql-delete

Solution

What worked: changing innodb_buffer_pool_size to 256M (see comments under Quassnoi's original comment).

Problem

I'm trying to delete 267 records out of about 40 million. The query looks like: ``` delete from pricedata where pricedate > '20120413' ``` pricedate is a `char(8)` field. I know about adjusting `innodb_buffer_pool_size`, but if I can do ``` select from pricedata where pricedate > '20120413' ``` and get 267 records (and that's all there are), no errors, why does it choke on the delete? And if adjusting `innodb_buffer_pool_size` doesn't work, what should I do?

Original source