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

Fix Current_user being NULL after reset connection #2996

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion contrib/babelfishpg_tds/src/backend/tds/tdsprotocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ TdsDiscardAll()

/* Closing portals might run user-defined code, so do that first. */
PortalHashTableDeleteAll();
SetPGVariable("session_authorization", NIL, false);
ResetAllOptions();
DropAllPreparedStatements();
Async_UnlistenAll();
Expand Down
3 changes: 3 additions & 0 deletions test/dotnet/ExpectedOutput/2_Successful_reset.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#Q#select db_name();
#D#nvarchar
master
#Q#select current_user;
#D#varchar
dbo
#Q#drop database db1;
1 change: 1 addition & 0 deletions test/dotnet/input/ResetConnection/2_Successful_reset.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
select db_name();
select current_user;
drop database db1;
5 changes: 0 additions & 5 deletions test/dotnet/utils/ConfigSetup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ public static class ConfigSetup
/* Declaring variables required for a Test Run. */
static readonly Dictionary<string, string> Dictionary = LoadConfig();
public static readonly string BblConnectionString = Dictionary["bblConnectionString"];

public static readonly string BCPConnectionString = Dictionary["BCPConnectionString"];
public static readonly string QueryFolder = Dictionary["queryFolder"];
public static readonly string TestName = Dictionary["testName"];
public static readonly bool RunInParallel = bool.Parse(Dictionary["runInParallel"]);
Expand Down Expand Up @@ -47,9 +45,6 @@ public static Dictionary<string, string> LoadConfig()

/* Creating Server Connection String and Query. */
dictionary["bblConnectionString"] = BuildConnectionString(dictionary["babel_URL"], dictionary["babel_port"],
dictionary["babel_databaseName"],
dictionary["babel_user"], dictionary["babel_password"]) + "pooling=false;";
dictionary["BCPConnectionString"] = BuildConnectionString(dictionary["babel_URL"], dictionary["babel_port"],
dictionary["babel_databaseName"],
dictionary["babel_user"], dictionary["babel_password"]);
return dictionary;
Expand Down
2 changes: 1 addition & 1 deletion test/dotnet/utils/TestUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public bool insertBulkCopy(DbConnection bblCnn, DbCommand bblCmd, String sourceT
/* To Enforce Reset Connection. */
reader = bblCmd.ExecuteReader();
using (SqlConnection destinationConnection =
new SqlConnection(ConfigSetup.BCPConnectionString))
new SqlConnection(ConfigSetup.BblConnectionString))
{
destinationConnection.Open();

Expand Down
Loading