Test Build: CUBRID 2008 R4.1 (8.4.1.1018) (64bit release build for linux_gnu)
OS: Linux 64
Description:
First for Indexed
In table the column's constraint is reverse unique index or unique index.
The Indexed's value using method [cubrid_schema()|http://www.php.net/manual/en/function.cubrid-schema.php] is zero.
Second for UNIQUE:
In table the column's constraint is reverse unique index, the UNIQUE's value using cubrid_schema() method is zero.
In table the column's constraint is unique index, the UNIQUE's value using cubrid_schema() method is 1.
Repro steps:
1. execute: php attribute_test.phpt
statements in attribute_test.phpt
{noformat}
$conn = cubrid_connect(localhost, 33113, demodb,dba,);
cubrid_execute($conn,drop table if EXISTS tb;);
cubrid_execute($conn,CREATE TABLE tb(id int, phone VARCHAR(10),address string););
cubrid_execute($conn,create reverse unique index rever_unique_tb on tb(id));
cubrid_execute($conn,create reverse index reverse_tb on tb(phone));
cubrid_execute($conn,create unique index unique_tb on tb(address));
cubrid_execute($conn,insert into tb(id, phone, address) values(1,'1111-11-11','changping'));
$schema = cubrid_schema($conn,CUBRID_SCH_ATTRIBUTE,tb);
var_dump($schema);
cubrid_disconnect($conn);
{noformat}
Actual result:
{noformat}
array(3) {
[0]=
array(13) {
[ATTR_NAME]=
string(2) id
.................
[INDEXED]=
string(1) 0
.................
[UNIQUE]=
string(1) 0
.....................
[CLASS_NAME]=
string(2) tb
[SOURCE_CLASS]=
string(2) tb
}
[1]=
array(13) {
[ATTR_NAME]=
string(5) phone
....................
[INDEXED]=
string(1) 1
........................
[UNIQUE]=
string(1) 0
............
[CLASS_NAME]=
string(2) tb
[SOURCE_CLASS]=
string(2) tb
}
[2]=
array(13) {
[ATTR_NAME]=
string(7) address
...............................
[INDEXED]=
string(1) 0
...............................
[UNIQUE]=
string(1) 1
......................
[CLASS_NAME]=
string(2) tb
[SOURCE_CLASS]=
string(2) tb
}
}
{noformat}
Expect result:
In table the column's constraint is reverse unique index or unique index.
Would Indexed's value be 1.
Would the UNIQUE's value for reverse unique index column be same with unique index column