I'm updating a 22.214.171.124 website that has all the current patches applied. Upon running magento connect mage_update_all (succesfully) I'm getting this error. (Cache, locks, sessions etc cleared)
I haven't had any luck finding the SQL for CREATE TABLE `core_email_queue` and I think there is another related table that is missing as well.
Can someone point me to the source where this table is created and I can manually create this. I'm not seeing any other errors so I assume no other tables are missing from this update.
Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'core_email_queue' doesn't exist, query was: SELECT COUNT(*) FROM `core_email_queue` AS `main_table` WHERE (main_table.processed_at IS NULL)' in /var/www/html/lib/Zend/Db/Statement/Pdo.php:235
I've verified that these tables are missing from the DB.
So I finally solved this issue. For whatever reason the database version in core_resource was set to 126.96.36.199 before I updated from 188.8.131.52 to 184.108.40.206 I believe this might have been done by one of the recent security patches.
So when the website completed its update it did not execute the .SQL update file. I had to go into the database and look in core_resource and change the version number from 220.127.116.11 to 18.104.22.168 which caused the SQL file to run and properly update the database.
I'm not sure if this was an oversight of one of the recent security patches.
Thanks for posting this, it brings up an ancillary problem that may occur for people who applied the SUPEE-6788 patch on their current version and then later have the 22.214.171.124 upgrade fail upon finding the CMS block and variable tables already exist. The fix will be similar.