X-Git-Url: http://git.cyclocoop.org/%24dirpuce/puce%24spip_lang_rtl.gif?a=blobdiff_plain;ds=sidebyside;f=includes%2Flibs%2Frdbms%2Fdatabase%2FDatabaseMysqlBase.php;h=d1d0179d71653c544d5a1866f12dde5763d6e012;hb=4ccb228bde9294d96ddcb5c255565c89dbcbf879;hp=8fb8db5c1673786986e9434cfb8dc97d27e4a366;hpb=0821bea5a63f4e500fdee4844c79daa31f3de00d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/rdbms/database/DatabaseMysqlBase.php b/includes/libs/rdbms/database/DatabaseMysqlBase.php index 8fb8db5c16..d1d0179d71 100644 --- a/includes/libs/rdbms/database/DatabaseMysqlBase.php +++ b/includes/libs/rdbms/database/DatabaseMysqlBase.php @@ -1418,40 +1418,6 @@ abstract class DatabaseMysqlBase extends Database { return in_array( $name, $this->listViews( $prefix ) ); } - /** - * Allows for index remapping in queries where this is not consistent across DBMS - * - * @param string $index - * @return string - */ - protected function indexName( $index ) { - /** - * When SQLite indexes were introduced in r45764, it was noted that - * SQLite requires index names to be unique within the whole database, - * not just within a schema. As discussed in CR r45819, to avoid the - * need for a schema change on existing installations, the indexes - * were implicitly mapped from the new names to the old names. - * - * This mapping can be removed if DB patches are introduced to alter - * the relevant tables in existing installations. Note that because - * this index mapping applies to table creation, even new installations - * of MySQL have the old names (except for installations created during - * a period where this mapping was inappropriately removed, see - * T154872). - */ - $renamed = [ - 'ar_usertext_timestamp' => 'usertext_timestamp', - 'un_user_id' => 'user_id', - 'un_user_ip' => 'user_ip', - ]; - - if ( isset( $renamed[$index] ) ) { - return $renamed[$index]; - } else { - return $index; - } - } - protected function isTransactableQuery( $sql ) { return parent::isTransactableQuery( $sql ) && !preg_match( '/^SELECT\s+(GET|RELEASE|IS_FREE)_LOCK\(/', $sql );