# fix back and forth so tableName() works right.
self::changePrefix( $this->oldTablePrefix );
- $oldTableName = $this->db->tableName( $tbl, false );
+ $oldTableName = $this->db->tableName( $tbl, 'raw' );
self::changePrefix( $this->newTablePrefix );
- $newTableName = $this->db->tableName( $tbl, false );
+ $newTableName = $this->db->tableName( $tbl, 'raw' );
if( $this->dropCurrentTables && !in_array( $this->db->getType(), array( 'postgres' ) ) ) {
$this->db->dropTable( $tbl, __METHOD__ );
* @param $name Boolean
* @return String
*/
- public function tableName( $name, $quoted = true ) {
+ public function tableName( $name, $format = 'quoted' ) {
// we want maximum compatibility with MySQL schema
return $name;
}
return $retval;
}
- function tableName( $name, $quoted = true ) {
+ function tableName( $name, $format = 'quoted' ) {
/*
Replace reserved words with better ones
Using uppercase because that's the only way Oracle can handle
break;
}
- return parent::tableName( strtoupper( $name ), $quoted );
+ return parent::tableName( strtoupper( $name ), $format );
}
function tableNameInternal( $name ) {
AND attname=%s;
SQL;
- $table = $db->tableName( $table, false );
+ $table = $db->tableName( $table, 'raw' );
$res = $db->query(
sprintf( $q,
$db->addQuotes( $wgDBmwschema ),
return $res;
}
- function tableName( $name, $quoted = true ) {
+ function tableName( $name, $format = 'quoted' ) {
# Replace reserved words with better ones
switch( $name ) {
case 'user':
case 'text':
return 'pagecontent';
default:
- return parent::tableName( $name, $quoted );
+ return parent::tableName( $name, $format );
}
}
if ( !$schema ) {
$schema = $wgDBmwschema;
}
- $table = $this->tableName( $table, false );
+ $table = $this->tableName( $table, 'raw' );
$etable = $this->addQuotes( $table );
$eschema = $this->addQuotes( $schema );
$SQL = "SELECT 1 FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n "
* Use MySQL's naming (accounts for prefix etc) but remove surrounding backticks
*
* @param $name
- * @param bool $quoted
+ * @param $format String
* @return string
*/
- function tableName( $name, $quoted = true ) {
+ function tableName( $name, $format = 'quoted' ) {
// table names starting with sqlite_ are reserved
if ( strpos( $name, 'sqlite_' ) === 0 ) {
return $name;
}
- return str_replace( '"', '', parent::tableName( $name, $quoted ) );
+ return str_replace( '"', '', parent::tableName( $name, $format ) );
}
/**
// ALTER SESSION SET CURRENT_SCHEMA = ...
// was used.
$dbw->query( "CALL ctx_ddl.sync_index(" .
- $dbw->addQuotes( $dbw->getDBname() . '.' . $dbw->tableName( 'si_text_idx', false ) ) . ")" );
+ $dbw->addQuotes( $dbw->getDBname() . '.' . $dbw->tableName( 'si_text_idx', 'raw' ) ) . ")" );
$dbw->query( "CALL ctx_ddl.sync_index(" .
- $dbw->addQuotes( $dbw->getDBname() . '.' . $dbw->tableName( 'si_title_idx', false ) ) . ")" );
+ $dbw->addQuotes( $dbw->getDBname() . '.' . $dbw->tableName( 'si_title_idx', 'raw' ) ) . ")" );
}
/**