php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35450 mysqli extension reports too many warnings
Submitted: 2005-11-28 16:35 UTC Modified: 2005-11-28 17:07 UTC
From: jellicle at gmail dot com Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 5.1.0 OS: Debian
Private report: No CVE-ID: None
 [2005-11-28 16:35 UTC] jellicle at gmail dot com
Description:
------------
Mysqli extension throws too many warnings.  For example, "SELECT * FROM table" results in a warning: "Warning: mysqli::query(): No index used in query/prepared statement SELECT * FROM table ..."  There's no way to have MySQL use an index when selecting all records, so this warning appears every time one wants to select all records from any table.  Sometimes Mysqli gives this warning even when MySQL is apparently using an index (i.e. the same query, 
executed with EXPLAIN, says it's using an index).

Mysqli should give warnings only on real problems.  Not using an index is at most worthy of a notice, not a warning, especially when there's no way to use an index with a particular query!


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-28 17:07 UTC] tony2001@php.net
Use mysqli_report() to disable that.
 [2023-03-15 20:19 UTC] rg at mejoramos dot com
yet in 2023 continue identical BUG:

simply execute the QUERY:

"SHOW FIELDS FROM `table`;"

then you will obtain [Fatal error. . .]

( PHP 8.1 )
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 06:01:30 2024 UTC