Skip to content

Commit

Permalink
Merge pull request #19 from thomasvargiu/fix/select-new-line
Browse files Browse the repository at this point in the history
Fixed issue not retrying queries with some SELECT queries
  • Loading branch information
thomasvargiu authored Sep 30, 2016
2 parents 34b8c48 + 763e983 commit 8ffda79
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,6 @@ private function resetTransactionNestingLevel()
*/
public function isUpdateQuery($query)
{
return !preg_match('/^[\s\n\r\t(]*(select|show) /i', $query);
return !preg_match('/^[\s\n\r\t(]*(select|show|describe)[\s\n\r\t(]+/i', $query);
}
}
1 change: 1 addition & 0 deletions tests/unit/ConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public function isUpdateQueryDataProvider()
['DELETE ', true],
['SELECT ', false],
['select ', false],
["\n\tSELECT\n", false],
['(select ', false],
[' (select ', false],
['
Expand Down

0 comments on commit 8ffda79

Please sign in to comment.