Skip to content

Commit 9feaf2c

Browse files
committed
Fix testMode() with upsert()
Only resetRun() if not in test mode.
1 parent 729f3f1 commit 9feaf2c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

system/Database/BaseBuilder.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1785,7 +1785,9 @@ protected function batchExecute(string $renderMethod, int $batchSize = 100)
17851785
}
17861786
}
17871787

1788-
$this->resetWrite();
1788+
if (! $this->testMode) {
1789+
$this->resetWrite();
1790+
}
17891791

17901792
return $this->testMode ? $savedSQL : $affectedRows;
17911793
}

0 commit comments

Comments
 (0)