ID: 32019 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Wont fix Bug Type: MySQL related Operating System: All PHP Version: 5.0.3 New Comment:
For MySQL Versions >= 4.1.x please use the MySQLi Extension. Previous Comments: ------------------------------------------------------------------------ [2005-02-18 12:40:39] [EMAIL PROTECTED] 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 this bug report at http://bugs.php.net/?id=32019&edit=1