server/mssql: update odbc git reference to the commit which has error message fix

## Description

I come across a flaky test due to inconsistent error messages from the odbc lib we use for MSSQL database interactions.
```
cabal new-run -- test:graphql-engine-tests mssql
Up to date

Database.MSSQL.TransactionSpec
  runTx
    runs command in a transaction
    commits a successful transaction, returning a single field
    commits a successful transaction, returning multiple fields
    an unsuccesful transaction, expecting Int
    a successfull query expecting multiple rows
    an unsuccesful transaction; expecting single row
    displays the SQL Server error on an unsuccessful transaction FAILED [1]
    rolls back an unsuccessful transaction

Failures:

  src-test/Database/MSSQL/TransactionSpec.hs:60:15:
  1) Database.MSSQL.TransactionSpec.runTx displays the SQL Server error on an unsuccessful transaction
       expected: UnsuccessfulReturnCode "odbc_SQLExecDirectW" (-1) "[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The definition for column 'INVALID_SYNTAX' must include a data type.[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The definition for column 'INVALID_SYNTAX' must include a data type."
        but got: UnsuccessfulReturnCode "odbc_SQLExecDirectW" (-1) "[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The definition for column 'INVALID_SYNTAX' must include a data type.[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The definition for column 'INVALID_SYNTAX' must include a data type.\DEL"

  To rerun use: --match "/Database.MSSQL.TransactionSpec/runTx/displays the SQL Server error on an unsuccessful transaction/"

Randomized with seed 1101559172

Finished in 0.2140 seconds
8 examples, 1 failure
```
From above, we got a error message with `\DEL` appended. It is also driving the tests to fail in the CI on random PRs.

We brought this into notice of "fpco", the authors of the library and they got us a [quick fix](https://github.com/fpco/odbc/pull/43), which also improves the errors by removing the redundancy of the error message.

In this PR
- We update the `odbc` library git reference to fc5b592a60
- Update the error messages in tests to conform with improved error messages from `odbc`

## Related issues
Closes https://github.com/hasura/graphql-engine-mono/issues/3340

## Changelog

-  `CHANGELOG.md` is updated with user-facing content relevant to this PR.

## Affected components
-  server
-  tests

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3345
GitOrigin-RevId: a5694e8afb58b5ad71b9c9635a80dea1ec449f51
This commit is contained in:
Rakesh Emmadi 2022-01-13 16:43:52 +05:30 committed by hasura-bot
parent e30d51ee38
commit 42a2787290
4 changed files with 4 additions and 4 deletions

View File

@ -3,6 +3,7 @@
## Next release
(Add highlights/major features below)
- server: improve error messages in MSSQL database query exceptions
- server: in mssql transactions, rollback only if the transaction is active
- server: add request and response bodies to OpenAPI specification of REST endpoints
- server: implement upsert mutations for MS SQL Server (close #7864)

View File

@ -70,7 +70,7 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/fpco/odbc.git
tag: 7c0cea45d0b779419eb16177407c4ee9e7ba4c6f
tag: fc5b592a607d932e5fc96c0f74c0df7c3e910883
package odbc
ghc-options: -Wwarn

View File

@ -119,7 +119,7 @@ runInConn connString query =
invalidSyntaxError :: String
invalidSyntaxError =
"[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The definition for column 'INVALID_SYNTAX' must include a data type.[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The definition for column 'INVALID_SYNTAX' must include a data type."
"[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The definition for column 'INVALID_SYNTAX' must include a data type."
unexpectedMSSQLInternalError :: String
unexpectedMSSQLInternalError =

View File

@ -14,8 +14,7 @@ response:
- odbc_SQLExecDirectW
- -1
- "[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]There is already an object\
\ named 'author' in the database.[Microsoft][ODBC Driver 17 for SQL Server][SQL\
\ Server]There is already an object named 'author' in the database."
\ named 'author' in the database."
path: $
error: sql query exception
code: mssql-error