Skip to content

Commit cf751c4

Browse files
committed
Need more rows to max out the packet size
1 parent 478bba3 commit cf751c4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spec/mysql2/result_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,10 @@
139139
it "should raise an exception if streaming ended due to a timeout" do
140140
# Create an extra client instance, since we're going to time it out
141141
client = Mysql2::Client.new DatabaseCredentials['root']
142-
client.query "CREATE TEMPORARY TABLE streamingTest (val VARCHAR(10))"
142+
client.query "CREATE TEMPORARY TABLE streamingTest (val BINARY(255))"
143143

144144
# Insert enough records to force the result set into multiple reads
145+
# (the BINARY type is used simply because it forces full width results)
145146
10000.times do |i|
146147
client.query "INSERT INTO streamingTest (val) VALUES ('Foo #{i}')"
147148
end

0 commit comments

Comments
 (0)