Merge "Fix IDEA warnings in CloneDatabase"
[lhc/web/wiklou.git] / includes / libs / rdbms / database / DatabaseMysqlBase.php
index 9be3ede..7f67b6e 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;
@@ -991,7 +996,7 @@ abstract class DatabaseMysqlBase extends DatabaseBase {
                        return true;
                }
 
-               $this->queryLogger->debug( __METHOD__ . " failed to acquire lock\n" );
+               $this->queryLogger->warning( __METHOD__ . " failed to acquire lock '$lockName'\n" );
 
                return false;
        }
@@ -1013,7 +1018,7 @@ abstract class DatabaseMysqlBase extends DatabaseBase {
                        return true;
                }
 
-               $this->queryLogger->debug( __METHOD__ . " failed to release lock\n" );
+               $this->queryLogger->warning( __METHOD__ . " failed to release lock '$lockName'\n" );
 
                return false;
        }