Skip to content

Commit

Permalink
Testing empty result
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Aug 18, 2024
1 parent 97d0ed5 commit c2f8f59
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/TestUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ public static function generateResultSetQuery(array $columnNames, array $rows, A
}, $rows));

if ($isEmpty) {
$query .= ' WHERE 1 = 0';
// MySQL 5.7 does not allow WHERE without FROM
$query = 'SELECT * FROM (' . $query . ') t WHERE 1 = 0';
}

return $query;
Expand Down

0 comments on commit c2f8f59

Please sign in to comment.