#25460 [Bgs->Csd]: mysql_list_fields does NOT use link_identifier
| From: | beckman at purplecow dot com | Date: | Wed, 10 Sep 2003 17:03:01 +0000 |
| Subject: | #25460 [Bgs->Csd]: mysql_list_fields does NOT use link_identifier | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-47386@lists.php.net to get a copy of this message | ||
ID: 25460
User updated by: beckman at purplecow dot com
Reported By: beckman at purplecow dot com
-Status: Bogus
+Status: Closed
Bug Type: MySQL related
Operating System: FreeBSD 5.0-RELEASE #0
PHP Version: 4.3.3
Assigned To: georg
New Comment:
Whoops. Now that you've marked it depreciated, I withdrawal my bug
report! I'll get phpMyAdmin to stop using it, and thus this bug goes
away. But just for me feeling good, can you not mark it bogus? That
makes me feel like less of a man, and much less of a geek... :-) A
closed would be so much better.
Previous Comments:
------------------------------------------------------------------------
[2003-09-10 13:00:46] beckman at purplecow dot com
If your supposition is correct (phpMyAdmin is broken), then why would
mysql_list_fields("crt", "assignments") with a currently valid open
link to the database attempt to use the table mysql.assignments? Even
if you give it a link, it uses the mysql database to find the table.
While I'm not a C/C++ programmer, I read the code for that function. I
noticed that ZEND_FETCH_RESOURCE2 was added in 4.0 beta 3, and wonder
if THAT function is somehow causing this obscure occurence of this bug.
Why do I think it is a bug? Because mysql_list_fields DOES work as
advertised in the code I could come up with. HOWEVER, in that specific
example in phpMyAdmin, it does not. I'm wondering if somehow
ZEND_FETCH_RESOURCE2 is returning the wrong mysql->conn that is being
used to connect to the DB and list the fields from a table.
If any connection to a database can be used to read any DB from that
connection, and just before running mysql_list_fields I can do a "show
fields from crt.assignments" and it works using both a defined
link_resource or leaving it blank (using the currently selected
connection), why would mysql_list_fields("crt", "assignments") fail on
the next line?
I swear it isn't bogus. And if it is, I'll buy you a beer or something
and hang my head in shame.
------------------------------------------------------------------------
[2003-09-10 03:50:39] georg@php.net
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[2003-09-10 03:43:58] georg@php.net
assigned to myself
------------------------------------------------------------------------
[2003-09-10 03:43:08] georg@php.net
mysql_list_fields is deprecated, use SHOW COLUMNS FROM table
[LIKE 'foo'] instead.
This should be documented in the manual. Reclassified as
documentation bug.
------------------------------------------------------------------------
[2003-09-09 15:47:42] sniper@php.net
This works as advertised. phpMyadmin is broken.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/25460
--
Edit this bug report at http://bugs.php.net/?id=25460&edit=1