Issues

ZF-2692: Zend_Db_Profiler::queryStart() uses unsafe method to examine query type.

Description

Zend_Db_Profiler::queryStart() takes the first 6 characters in the query string to determine which kind of query it is. This is unsafe because a query might for example start with a parenthesis. Possible solution: check position of the words INSERT, DELETE, SELECT, and UPDATE. Whichever comes first decides what kind of query it is.

Comments

Please categorize/fix as needed.

Reassigning as Ralph is the maintainer of Zend_Db

add ltrim() to queryText at SVN r15396 .