Skip to content

Commit f8b95a3

Browse files
committed
Actually force cacheRows if using a statement
1 parent 3431c87 commit f8b95a3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/mysql2/result.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,7 @@ static VALUE rb_mysql_result_each(int argc, VALUE * argv, VALUE self) {
886886

887887
if (wrapper->stmt_wrapper && !cacheRows && !wrapper->is_streaming) {
888888
rb_warn(":cache_rows is forced for prepared statements (if not streaming)");
889+
cacheRows = 1;
889890
}
890891

891892
if (wrapper->stmt_wrapper && !cast) {

0 commit comments

Comments
 (0)