From: [EMAIL PROTECTED] Operating system: All PHP version: 5.0.3 PHP Bug Type: MySQL related Bug description: Auto EXPLAIN feature of mysql.trace_mode doesn't work on MySQL 4.1
Description: ------------ MySQL 4.1 and greater return more information in EXPLAIN than older version. Thus "automatic EXPLAIN on every SELECT" feature of mysql.trace_mode doesn't work. MySQL 4.0 and earlier return join type in 2nd column, 4.1 and greater in 4th column. Moreover, full index scan is represented by "index" and not "INDEX" type. See http://dev.mysql.com/doc/mysql/en/explain.html The problem lies on line 1256 of ext/mysql/php_mysql.c, revision 1.210. In my eyes, this feature of mysql.trace_mode is unnecessary and can be removed as the full table scan and full index scan can be perfectly valid in some cases and shouldn't produce an error. But if it will be kept, it should work on all MySQL versions. Reproduce code: --------------- <?php ini_set("mysql.trace_mode", true); mysql_query("SELECT * FROM table"); ?> Expected result: ---------------- Your query requires a full tablescan ... Actual result: -------------- Nothing. -- Edit bug report at http://bugs.php.net/?id=32019&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32019&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32019&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32019&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=32019&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=32019&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=32019&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=32019&r=needscript Try newer version: http://bugs.php.net/fix.php?id=32019&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=32019&r=support Expected behavior: http://bugs.php.net/fix.php?id=32019&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=32019&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=32019&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=32019&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32019&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=32019&r=dst IIS Stability: http://bugs.php.net/fix.php?id=32019&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=32019&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=32019&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=32019&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=32019&r=mysqlcfg