errno 12 comes from a couple of things.
Primarily, there is a bug in earlier versions of MySQL 5.1 and some 5.0.x versions.
http://bugs.mysql.com/bug.php?id=20815 You might want to upgrade your MySQL version. 5.0.x versions previous to 5.0.48 also exhibit this behavior.
The next possibility is that you've reached the limit of a 32 bit OS and can't allocate more memory but that would take millions of posts, not thousands.