Show rows for all reads and confirm nextval()
SHOW, EXPLAIN, VALUES and TABLE count as reads now but their rows were dropped and reported as a write; every read except SET now returns its rows. nextval() advances a sequence, so it needs confirmation like setval().
This commit is contained in:
@@ -174,7 +174,7 @@ class DbController extends Controller
|
||||
$stmt = $this->db->prepare($query);
|
||||
$stmt->execute();
|
||||
|
||||
if ($statementType === 'SELECT' || ($statementType === 'WITH' && SqlGuard::isReadOnly($query))) {
|
||||
if ($statementType === 'SELECT' || ($statementType !== 'SET' && SqlGuard::isReadOnly($query))) {
|
||||
// Read row by row and stop at MAX_ROWS, instead of
|
||||
// fetchAll() + array_slice — otherwise a SELECT without
|
||||
// LIMIT on a huge table would still pull everything into
|
||||
|
||||
Reference in New Issue
Block a user