Skip to content

Commit

Permalink
Merge pull request #1035 from elthrasher/mysql-replication-bug
Browse files Browse the repository at this point in the history
expression was missing mode
  • Loading branch information
pleerock committed Oct 17, 2017
2 parents 287eb22 + dad4a4e commit 84f5be2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/driver/mysql/MysqlQueryRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export class MysqlQueryRunner implements QueryRunner {
if (this.databaseConnectionPromise)
return this.databaseConnectionPromise;

if (this.driver.isReplicated) {
if (this.mode === "slave" && this.driver.isReplicated) {

this.databaseConnectionPromise = this.driver.obtainSlaveConnection().then(connection => {
this.databaseConnection = connection;
Expand Down Expand Up @@ -860,4 +860,4 @@ export class MysqlQueryRunner implements QueryRunner {
return c;
}

}
}

0 comments on commit 84f5be2

Please sign in to comment.