Make masterPosWait() error clearer
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 9 Mar 2017 05:16:00 +0000 (21:16 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Thu, 9 Mar 2017 05:22:36 +0000 (21:22 -0800)
Change-Id: I86706b2c4167fba897c56235072675b66ed06634

includes/libs/rdbms/database/DatabaseMysqlBase.php

index 9270589..e900027 100644 (file)
@@ -821,7 +821,8 @@ abstract class DatabaseMysqlBase extends Database {
 
                $row = $res ? $this->fetchRow( $res ) : false;
                if ( !$row ) {
-                       throw new DBExpectedError( $this, "Failed to query MASTER_POS_WAIT()" );
+                       throw new DBExpectedError( $this,
+                               "MASTER_POS_WAIT() or MASTER_GTID_WAIT() failed: {$this->lastError()}" );
                }
 
                // Result can be NULL (error), -1 (timeout), or 0+ per the MySQL manual