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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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

Add a Patch

Pull Requests

Add a Pull Request

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 Apr 25 06:01:35 2024 UTC