Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge common code bases for TdsParserStateObject.cs (2) #1844

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
840af41
Merging "Buffer read" methods of TdsParserStateObject (note: includes…
panoskj Mar 18, 2022
5429584
Merging of TdsParserStateObject.TryReadPlpBytes method (note: ports p…
panoskj Mar 19, 2022
d112701
Merging "Value Skip Logic" methods of TdsParserStateObject.
panoskj Mar 19, 2022
f115d59
Merging some "Network/Packet Reading & Processing" methods of TdsPars…
panoskj Mar 19, 2022
7c3dfe2
Merging of TdsParserStateObject.ReadSniSyncOverAsync method.
panoskj Mar 19, 2022
6ae1321
Merging some "Network/Packet Reading & Processing" methods of TdsPars…
panoskj Mar 19, 2022
e5af755
Merging TdsParserStateObject.ReadSni method.
panoskj Mar 19, 2022
49f7169
Merging TdsParserStateObject.IsConnectionAlive method.
panoskj Mar 19, 2022
7073564
Merging TdsParserStateObject.ValidateSNIConnection method (note: chan…
panoskj Mar 19, 2022
1ddaeec
Merging TdsParserStateObject.ReadSniError method.
panoskj Mar 19, 2022
32b2b2f
Merging of TdsParserStateObject.ProcessSniPacket method.
panoskj Mar 19, 2022
81f549e
Merging of TdsParserStateObject.ReadAsyncCallback (note: ports parts …
panoskj Mar 19, 2022
ff3d22e
Merging TdsParserStateObject.WriteAsyncCallback method.
panoskj Mar 19, 2022
567d0e6
Merging some "Network/Packet Writing & Processing" methods of TdsPars…
panoskj Mar 19, 2022
96c2e68
Merging constructor of TdsParserStateObject.
panoskj Mar 20, 2022
32b2699
Merging common type NullBitmap of TdsParserStateObject.
panoskj Mar 20, 2022
c910c06
Merging StartSession, Cancel and ResetCancelAndProcessAttention metho…
panoskj Mar 20, 2022
a720efa
Merging DecrementPendingCallbacks and incrementPendingCallbacks metho…
panoskj Mar 20, 2022
6a89090
TdsParserStateObject: Removed unnecessary "#pragma warning disable". …
panoskj Nov 23, 2022
aadf8e3
TdsParserStateObject: replaced some netfx fields with properties, to …
panoskj Nov 23, 2022
bc0ceb2
TdsParserStateObject: removed consecutive empty lines.
panoskj Nov 23, 2022
98bd515
TdsParserStateObject: Removed trailing whitespaces. Removed unnecessa…
panoskj Nov 23, 2022
2e2dab5
Merge remote-tracking branch 'remotes/origin/main' into MergeTdsParse…
panoskj Feb 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3088,7 +3088,7 @@ private void WriteToServerInternalRestAsync(CancellationToken cts, TaskCompletio
{
_stateObj = _parser.GetSession(this);
_stateObj._bulkCopyOpperationInProgress = true;
_stateObj.StartSession(ObjectID);
_stateObj.StartSession(this);
}
finally
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1283,14 +1283,14 @@ public override void Cancel()
TdsParserStateObject stateObj = _stateObj;
if (null != stateObj)
{
stateObj.Cancel(ObjectID);
stateObj.Cancel(this);
}
else
{
SqlDataReader reader = connection.FindLiveReader(this);
if (reader != null)
{
reader.Cancel(ObjectID);
reader.Cancel(this);
}
}
}
Expand Down Expand Up @@ -5986,7 +5986,7 @@ private void GetStateObject(TdsParser parser = null)
}

TdsParserStateObject stateObj = parser.GetSession(this);
stateObj.StartSession(ObjectID);
stateObj.StartSession(this);

_stateObj = stateObj;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -797,12 +797,13 @@ internal DataTable BuildSchemaTable()
return schemaTable;
}

internal void Cancel(int objectID)
internal void Cancel(SqlCommand command)
{
Debug.Assert(command == _command, "Calling command from an object that isn't this reader's command");
TdsParserStateObject stateObj = _stateObj;
if (null != stateObj)
{
stateObj.Cancel(objectID);
stateObj.Cancel(command);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@ internal void EnableMars()

internal TdsParserStateObject CreateSession()
{
TdsParserStateObject session = new TdsParserStateObject(this, (SNIHandle)_pMarsPhysicalConObj.Handle, true);
TdsParserStateObject session = new TdsParserStateObject(this, _pMarsPhysicalConObj, true);
SqlClientEventSource.Log.TryAdvancedTraceEvent("<sc.TdsParser.CreateSession|ADV> {0} created session {1}", ObjectID, session.ObjectID);
return session;
}
Expand Down Expand Up @@ -9340,7 +9340,7 @@ internal void TdsLogin(SqlLogin rec,
}

_physicalStateObj.WritePacket(TdsEnums.HARDFLUSH);
_physicalStateObj.ResetSecurePasswordsInfomation(); // Password information is needed only from Login process; done with writing login packet and should clear information
_physicalStateObj.ResetSecurePasswordsInformation(); // Password information is needed only from Login process; done with writing login packet and should clear information
_physicalStateObj._pendingData = true;
_physicalStateObj._messageStatus = 0;

Expand Down
Loading