}
}
- public function tableExists( $table, $fname = __METHOD__ ) {
- $tableRaw = $this->tableName( $table, 'raw' );
- if ( isset( $this->sessionTempTables[$tableRaw] ) ) {
- return true; // already known to exist
- }
-
- $table = $this->tableName( $table );
- $ignoreErrors = true;
- $res = $this->query( "SELECT 1 FROM $table LIMIT 1", $fname, $ignoreErrors );
-
- return (bool)$res;
- }
+ abstract public function tableExists( $table, $fname = __METHOD__ );
public function indexUnique( $table, $index ) {
$indexInfo = $this->indexInfo( $table, $index );
* @see WANObjectCache::getWithSetCallback()
*
* @param IDatabase $db1
- * @param IDatabase $db2 [optional]
+ * @param IDatabase|null $db2 [optional]
* @return array Map of values:
* - lag: highest lag of any of the DBs or false on error (e.g. replication stopped)
* - since: oldest UNIX timestamp of any of the DB lag estimates