Skip to content

Commit

Permalink
Use DISCARD ALL instead of RESET ALL
Browse files Browse the repository at this point in the history
Closes #34.
  • Loading branch information
trowski committed Aug 11, 2020
1 parent 7cf9d37 commit b027714
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Pool.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ final class Pool extends ConnectionPool implements Link
* @param ConnectionConfig $config
* @param int $maxConnections
* @param int $idleTimeout
* @param bool $resetConnections True to automatically execute RESET ALL on a connection before use.
* @param bool $resetConnections True to automatically execute DISCARD ALL on a connection before use.
* @param Connector|null $connector
*/
public function __construct(
Expand Down Expand Up @@ -80,7 +80,7 @@ protected function pop(): \Generator
\assert($connection instanceof Connection);

if ($this->resetConnections) {
yield $connection->query("RESET ALL");
yield $connection->query("DISCARD ALL");
}

return $connection;
Expand Down

0 comments on commit b027714

Please sign in to comment.