Every once in awhile I am programming something in Magento and I get a MySQL error. When the exception displays on the screen it only displays the first few characters of the query that it was trying to execute.
Is there a way to get Magento to display the entire query in the stack trace?
You can set on the debug mode in mysql adapter (Varien_Db_Adapter_Pdo_Mysql)
Go to file (var/debug/sql.txt), find the exception get query and execute it in mysql tool.
The problem is the PDO returns only part of the error, the full error message you can see only when you execute your query in some tool.