You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
This request is a followup to PR #1119 and Issue #1129, which adds an MSSQL backend tester
to the Juxtaposer test.
While running Juxtaposer with MSSQL on OpenShift using changes proposed in
PR #1119, the following error was encountered:
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv mssql_secretless_tcp vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
2020/02/07 17:30:09 Calling Connect from ensureWantedDbDataState, debug=true
2020/02/07 17:30:09 Connect called with debug: true
2020/02/07 17:30:09 Connection string: sqlserver://:@127.0.0.1:11433?app+name=Juxtaposer
2020/02/07 17:30:09 Connected to DB
2020/02/07 17:30:09 Creating database (if it doesn't exist)...
2020/02/07 17:30:09 query string:
IF NOT EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name = N'secretless')
CREATE DATABASE secretless
2020/02/07 17:30:11 Switching database...
2020/02/07 17:30:11 query string: USE secretless
2020/02/07 17:30:11 Query: DROP TABLE IF EXISTS mytable;
2020/02/07 17:30:11
2020/02/07 17:30:11 Query: CREATE TABLE mytable (
name TEXT,
id INTEGER,
birth_date DATE,
result DECIMAL,
passed BIT
);
2020/02/07 17:30:11
2020/02/07 17:30:11 ERROR sql: Could not execute query!
2020/02/07 17:30:11 Shutting down database connection...
2020/02/07 17:30:11 mssql: CREATE TABLE permission denied in database 'master'.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This error was apparently caused by the MSSQL server not honoring the USE <database-name> query in any subsequent queries (i.e. the server
would "forget" that the database had already been selected.
Describe the solution you'd like
As discussed with @sgnn7, the fix we devised is twofold:
Modify the database existence test so that it is only done once
at the beginning of testing (i.e. it won't get done for every
call to Connect(). Otherwise, for tests that are configured with
recreateConnections set to true, the database existence test would
be done for every test query.
Once the database has been confirmed to exist, include the
database name in the query for all subsequent queries.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
This request is a followup to PR #1119 and Issue #1129, which adds an MSSQL backend tester
to the Juxtaposer test.
While running Juxtaposer with MSSQL on OpenShift using changes proposed in
PR #1119, the following error was encountered:
This error was apparently caused by the MSSQL server not honoring the
USE <database-name>
query in any subsequent queries (i.e. the serverwould "forget" that the database had already been selected.
Describe the solution you'd like
As discussed with @sgnn7, the fix we devised is twofold:
at the beginning of testing (i.e. it won't get done for every
call to Connect(). Otherwise, for tests that are configured with
recreateConnections set to true, the database existence test would
be done for every test query.
database name in the query for all subsequent queries.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: