I want to log all the query that affect only specific table. For example catalog_product_flat_1
. So if query makes update, delete or insert operation to this table it should be logged. It cаused by deleting column sku
from time to time from this table and I want to find out the reason.
Add a comment
|
1 Answer
Enable logging by
- setting
Varien_Db_Adapter_Pdo_Mysql::_logAllQueries
totrue
- setting
\Varien_Db_Adapter_Pdo_Mysql::$_debug
totrue
Then grep in the file var/debug/pdo_mysql.log
for the table name. You can also add code to Varien_Db_Adapter_Pdo_Mysql::_debugStat
which filters for the table name.