# Determine existing default character set
if ( $conn->tableExists( "revision" ) ) {
$revision = $conn->escapeLike( $this->getVar( 'wgDBprefix' ) . 'revision' );
- $res = $conn->query( "SHOW TABLE STATUS LIKE '$revision'" );
+ $res = $conn->query( "SHOW TABLE STATUS LIKE '$revision'", __METHOD__ );
$row = $conn->fetchObject( $res );
if ( !$row ) {
$this->parent->showMessage( 'config-show-table-status' );
}
$engines = array();
- $res = $conn->query( 'SHOW ENGINES' );
+ $res = $conn->query( 'SHOW ENGINES', __METHOD__ );
foreach ( $res as $row ) {
if ( $row->Support == 'YES' || $row->Support == 'DEFAULT' ) {
$engines[] = $row->Engine;
$conn = $status->value;
$dbName = $this->getVar( 'wgDBname' );
if( !$conn->selectDB( $dbName ) ) {
- $conn->query( "CREATE DATABASE `$dbName`" );
+ $conn->query( "CREATE DATABASE `$dbName`", __METHOD__ );
$conn->selectDB( $dbName );
}
return $status;
$field = $prefix . '_namespace';
$tablename = $this->db->tableName( $table );
- $result = $this->db->query( "SHOW COLUMNS FROM $tablename LIKE '$field'" );
+ $result = $this->db->query( "SHOW COLUMNS FROM $tablename LIKE '$field'", __METHOD__ );
$info = $this->db->fetchObject( $result );
if ( substr( $info->Type, 0, 3 ) == 'int' ) {
wfOut( "...$field is already a full int ($info->Type).\n" );
} else {
wfOut( "Promoting $field from $info->Type to int... " );
-
- $sql = "ALTER TABLE $tablename MODIFY $field int NOT NULL";
- $this->db->query( $sql );
-
+ $this->db->query( "ALTER TABLE $tablename MODIFY $field int NOT NULL", __METHOD__ );
wfOut( "ok\n" );
}
}
if ( $dbw->getType() != 'mysql' )
return;
$tableName = $dbw->tableName( $table );
- $res = $dbw->query( "SELECT $field FROM $tableName LIMIT 0" );
+ $res = $dbw->query( "SELECT $field FROM $tableName LIMIT 0", __METHOD__ );
$flags = explode( ' ', mysql_field_flags( $res->result, 0 ) );
if ( in_array( 'binary', $flags ) ) {