# SHOW INDEX should work for 3.x and up:
# http://dev.mysql.com/doc/mysql/en/SHOW_INDEX.html
$table = $this->tableName( $table );
- $index = $this->indexName( $index );
$sql = 'SHOW INDEX FROM '.$table;
$res = $this->query( $sql, $fname );
if ( !$res ) {
* - if errors are explicitly ignored, returns NULL on failure
*/
function indexInfo($table, $index, $fname = 'Database::indexExists') {
- $sql = 'PRAGMA index_info(' . $this->addQuotes( $this->indexName( $index ) ) . ')';
+ $sql = 'PRAGMA index_info(' . $this->addQuotes( $index ) . ')';
$res = $this->query( $sql, $fname );
if ( !$res ) {
return null;
$row = $this->selectRow( 'sqlite_master', '*',
array(
'type' => 'index',
- 'name' => $this->indexName( $index ),
+ 'name' => $index,
), $fname );
if ( !$row || !isset( $row->sql ) ) {
return null;