Merge "Clean up lock name in lock messages in DatabaseMysqlBase"
[lhc/web/wiklou.git] / includes / libs / rdbms / database / DatabaseMysqlBase.php
index 627cad0..5134a4a 100644 (file)
@@ -519,6 +519,11 @@ abstract class DatabaseMysqlBase extends DatabaseBase {
        }
 
        function tableExists( $table, $fname = __METHOD__ ) {
+               $table = $this->tableName( $table, 'raw' );
+               if ( isset( $this->mSessionTempTables[$table] ) ) {
+                       return true; // already known to exist and won't show in SHOW TABLES anyway
+               }
+
                $encLike = $this->buildLike( $table );
 
                return $this->query( "SHOW TABLES $encLike", $fname )->numRows() > 0;