Skip to content

Commit 289ef12

Browse files
committed
BufferResultSets Travis test and Docs
1 parent d80e18c commit 289ef12

File tree

5 files changed

+24
-2
lines changed

5 files changed

+24
-2
lines changed

.ci/config/config.buffer.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"Data": {
3+
"ConnectionString": "server=127.0.0.1;user id=mysqltest;password='test;key=\"val';port=3306;database=mysqltest;ssl mode=none;Use Affected Rows=true;BufferResultSets=true",
4+
"PasswordlessUser": "no_password",
5+
"SecondaryDatabase": "testdb2",
6+
"SupportsCachedProcedures": true,
7+
"SupportsJson": true,
8+
"MySqlBulkLoaderLocalCsvFile": "%TESTDATA%/LoadData_UTF8_BOM_Unix.CSV",
9+
"MySqlBulkLoaderLocalTsvFile": "%TESTDATA%/LoadData_UTF8_BOM_Unix.TSV"
10+
}
11+
}

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ script:
2222
- echo 'Executing tests with No Compression, SSL' && ./.ci/use-config.sh config.ssl.json 172.17.0.1 3307 && time dotnet test tests/SideBySide/SideBySide.csproj -c Release -f netcoreapp1.1.1
2323
- echo 'Executing tests with Compression, SSL' && ./.ci/use-config.sh config.compression+ssl.json 172.17.0.1 3307 && time dotnet test tests/SideBySide/SideBySide.csproj -c Release -f netcoreapp1.1.1
2424
- echo 'Executing tests with Unix Domain Socket, No Compression, No SSL' && ./.ci/use-config.sh config.uds.json && time dotnet test tests/SideBySide/SideBySide.csproj -c Release -f netcoreapp1.1.1
25+
- echo 'Executing tests with Buffering, No Compression, No SSL' && ./.ci/use-config.sh config.buffer.json 172.17.0.1 3307 && time dotnet test tests/SideBySide/SideBySide.csproj -c Release -f netcoreapp1.1.1
2526

2627
after_script:
2728
- chmod +x .ci/build-docs.sh && ./.ci/build-docs.sh

docs/content/connection-options.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,16 @@ These are the other options that MySqlConnector supports. They are set to sensi
127127
<th style="width: 70%">Descriotion</th>
128128
</thead>
129129
<tr>
130-
<td>AllowUserVariables</td>
131-
<td>true</td>
130+
<td>AllowUserVariables, Allow User Variables</td>
131+
<td>false</td>
132132
<td>Setting this to true indicates that the provider expects user variables in the SQL.</td>
133133
</tr>
134+
<tr>
135+
<td>BufferResultSets, Buffer Result Sets</td>
136+
<td>false</td>
137+
<td>Setting this to true immediately buffers all result sets to memory upon calling ExecuteReader/ExecuteReaderAsync. This will allow the connection
138+
to execute another statement while still holding the original postion of the reader. Do not use when result sets are bigger than available memory.</td>
139+
</tr>
134140
<tr>
135141
<td>Compress, Use Compression, UseCompression</td>
136142
<td>false</td>

tests/SideBySide/Attributes.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,14 @@ public BulkLoaderLocalTsvFileFactAttribute()
6969

7070
public class UnbufferedResultSetsFactAttribute : FactAttribute
7171
{
72+
#if !BASELINE
7273
public UnbufferedResultSetsFactAttribute()
7374
{
7475
var csb = AppConfig.CreateConnectionStringBuilder();
7576
if(csb.BufferResultSets == true)
7677
Skip = "Do not run when BufferResultSets are used";
7778
}
79+
#endif
7880
}
7981

8082
public class TcpConnectionFactAttribute : FactAttribute

tests/SideBySide/QueryTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ public async Task MultipleReaders()
152152
public async Task MultipleBufferedReaders()
153153
{
154154
var csb = AppConfig.CreateConnectionStringBuilder();
155+
#if !BASELINE
155156
csb.BufferResultSets = true;
157+
#endif
156158

157159
using (var connection = new MySqlConnection(csb.ConnectionString))
158160
{

0 commit comments

Comments
 (0)