#32019 [Opn->WFx]: Auto EXPLAIN feature of mysql.trace_mode doesn't work on MySQL 4.1
| From: | georg@php.net | Date: | Sat, 19 Feb 2005 17:24:44 +0000 |
| Subject: | #32019 [Opn->WFx]: Auto EXPLAIN feature of mysql.trace_mode doesn't work on MySQL 4.1 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-74301@lists.php.net to get a copy of this message | ||
ID: 32019
Updated by: georg@php.net
Reported By: vrana@php.net
-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] vrana@php.net
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