@@ -38,7 +38,7 @@ public async Task ReadResultSetHeaderAsync(IOBehavior ioBehavior)
38
38
var firstByte = payload . HeaderByte ;
39
39
if ( firstByte == OkPayload . Signature )
40
40
{
41
- var ok = OkPayload . Create ( payload . Span , Session . SupportsDeprecateEof , Session . SupportsSessionTrack ) ;
41
+ var ok = OkPayload . Create ( payload . Span , Session . Context ) ;
42
42
43
43
// if we've read a result set header then this is a SELECT statement, so we shouldn't overwrite RecordsAffected
44
44
// (which should be -1 for SELECT) unless the server reports a non-zero count
@@ -48,8 +48,6 @@ public async Task ReadResultSetHeaderAsync(IOBehavior ioBehavior)
48
48
if ( ok . LastInsertId != 0 )
49
49
Command ? . SetLastInsertedId ( ( long ) ok . LastInsertId ) ;
50
50
WarningCount = ok . WarningCount ;
51
- if ( ok . NewSchema is not null )
52
- Connection . Session . DatabaseOverride = ok . NewSchema ;
53
51
m_columnDefinitions = default ;
54
52
State = ( ok . ServerStatus & ServerStatus . MoreResultsExist ) == 0
55
53
? ResultSetState . NoMoreData
@@ -109,7 +107,7 @@ public async Task ReadResultSetHeaderAsync(IOBehavior ioBehavior)
109
107
}
110
108
else
111
109
{
112
- var columnCountPacket = ColumnCountPayload . Create ( payload . Span , Session . SupportsCachedPreparedMetadata ) ;
110
+ var columnCountPacket = ColumnCountPayload . Create ( payload . Span , Session . Context . SupportsCachedPreparedMetadata ) ;
113
111
var columnCount = columnCountPacket . ColumnCount ;
114
112
if ( ! columnCountPacket . MetadataFollows )
115
113
{
@@ -132,7 +130,7 @@ public async Task ReadResultSetHeaderAsync(IOBehavior ioBehavior)
132
130
m_columnDefinitions = m_columnDefinitionPayloadCache . AsMemory ( 0 , columnCount ) ;
133
131
134
132
// if the server supports metadata caching but has re-sent it, something has changed since last prepare/execution and we need to update the columns
135
- var preparedColumns = Session . SupportsCachedPreparedMetadata ? DataReader . LastUsedPreparedStatement ? . Columns : null ;
133
+ var preparedColumns = Session . Context . SupportsCachedPreparedMetadata ? DataReader . LastUsedPreparedStatement ? . Columns : null ;
136
134
137
135
for ( var column = 0 ; column < columnCount ; column ++ )
138
136
{
@@ -156,7 +154,7 @@ public async Task ReadResultSetHeaderAsync(IOBehavior ioBehavior)
156
154
}
157
155
}
158
156
159
- if ( ! Session . SupportsDeprecateEof )
157
+ if ( ! Session . Context . SupportsDeprecateEof )
160
158
{
161
159
payload = await Session . ReceiveReplyAsync ( ioBehavior , CancellationToken . None ) . ConfigureAwait ( false ) ;
162
160
_ = EofPayload . Create ( payload . Span ) ;
@@ -252,13 +250,13 @@ public async Task<bool> ReadAsync(IOBehavior ioBehavior, CancellationToken cance
252
250
253
251
if ( payload . HeaderByte == EofPayload . Signature )
254
252
{
255
- if ( Session . SupportsDeprecateEof && OkPayload . IsOk ( payload . Span , Session . SupportsDeprecateEof ) )
253
+ if ( Session . Context . SupportsDeprecateEof && OkPayload . IsOk ( payload . Span , Session . Context ) )
256
254
{
257
- var ok = OkPayload . Create ( payload . Span , Session . SupportsDeprecateEof , Session . SupportsSessionTrack ) ;
255
+ var ok = OkPayload . Create ( payload . Span , Session . Context ) ;
258
256
BufferState = ( ok . ServerStatus & ServerStatus . MoreResultsExist ) == 0 ? ResultSetState . NoMoreData : ResultSetState . HasMoreData ;
259
257
return null ;
260
258
}
261
- if ( ! Session . SupportsDeprecateEof && EofPayload . IsEof ( payload ) )
259
+ if ( ! Session . Context . SupportsDeprecateEof && EofPayload . IsEof ( payload ) )
262
260
{
263
261
var eof = EofPayload . Create ( payload . Span ) ;
264
262
BufferState = ( eof . ServerStatus & ServerStatus . MoreResultsExist ) == 0 ? ResultSetState . NoMoreData : ResultSetState . HasMoreData ;
0 commit comments