PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » MDB2_Driver_oci8 » Bug #8531

tableInfo() fails due to lob locator index

Details

Submitted2006-08-22 10:51 UTC
Fromdv at allyoucanthink dot de
Assignedlsmith
StatusClosed
PackageMDB2_Driver_oci8
PHP VersionIrrelevant
OSirrelevant
Roadmaps(Not assigned)

Comments

[2006-08-22 10:51 UTC] dv at allyoucanthink dot de

Description:
------------
call of tableInfo() on tables containing some LOB fields fails on getTableIndexDefinition() for lob locator index. Oracle creates automatically lob locator index starting with SYS_IL*** for every LOB field but there's no records for this index in user_ind_columns.

[2006-08-22 11:09 UTC] dv at allyoucanthink dot de

well... adding following lines at the begin of MDB2_Driver_Reverse_oci8::getTableIndexDefinition() solves this problem in my particular case.

if(substr(strtoupper($index_name),0, 6) == 'SYS_IL') {
return null;
}

[2006-08-22 11:52 UTC] dv at allyoucanthink dot de

It seems like any system generated index has a flag in user_indexes: user_indexes.generated = 'Y'.
So the changing the query in MDB2_Driver_Manager_oci8::listTableIndexes() as bellow solves
the problem more elegant. AFAIK all table names in this view are upper case

$query = 'SELECT index_name name FROM user_indexes';
$query.= ' WHERE table_name='.strtoupper($table);
$query.= ' AND generated=' .$db->quote('N', 'text');