If grep/ack-grepgrep/ack-grep
can't find a SELECT * (likely) then just add an $debug_query = 'SELECTSELECT * FROM {mytable}'; if (substr($query, 0, strlen($debug_query)) == $debug_query) error_log(print_r(debug_backtrace(), TRUE), 4)
or match the whole query etc and then look at the Apache error log for the pouring in backtraces. If you dont want to trash the log, log into a file in /tmpjust add the following code.
$debug_query = 'SELECT * FROM {mytable}';
if (substr($query, 0, strlen($debug_query)) == $debug_query) {
error_log(print_r(debug_backtrace(), TRUE), 4);
}