php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28925 MYSQLI_UNIQUE_KEY_FLAG not found on UNIQUE indexes
Submitted: 2004-06-25 17:11 UTC Modified: 2004-08-11 14:51 UTC
From: danielc at analysisandsolutions dot com Assigned: georg (profile)
Status: Not a bug Package: MySQL related
PHP Version: 5CVS-2004-06-25 (dev) OS: Windows 2000
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: danielc at analysisandsolutions dot com
New email:
PHP Version: OS:

 

 [2004-06-25 17:11 UTC] danielc at analysisandsolutions dot com
Description:
------------
MYSQLI_UNIQUE_KEY_FLAG aren't being indicated for columns that have UNIQUE indexes.

Reproduce code:
---------------
mysqli_query($db->connection,
             'CREATE TABLE phptest_fk (a VARCHAR(5),' .
             ' UNIQUE (a))');

$r = mysqli_query($db->connection,
                  'SELECT a FROM phptest_fk');

$tmp = mysqli_fetch_field($r);
echo 'MYSQLI_UNIQUE_KEY_FLAG? ';
if ($tmp->flags & MYSQLI_UNIQUE_KEY_FLAG) {
    echo "yes\n";
} else {
    echo "no\n";
}

mysqli_query($db->connection,
             'DROP TABLE phptest_fk');


Expected result:
----------------
MYSQLI_UNIQUE_KEY_FLAG? yes

Actual result:
--------------
MYSQLI_UNIQUE_KEY_FLAG? no

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-11 14:51 UTC] georg@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Currently the resultset sent from server to client doesn't contain this flag anymore.

Not sure if it will be implemented again (if not I will remove it from PHP)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 11:01:30 2024 UTC