Fixed INT8 handling, support for testing statements, proper connection error handling #55
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This primarily implements four things:
Sync
message when an error occurs, which is consistent with the documentation.sqllogictests
make use of them, and GMS doesn't have a native boolean type, so we treat all booleans asInt32
types. You can read more in the comments.conn.Query
calls in tests only return specific kinds of errors, and all other errors are put into the returnedrows
. This differs fromconn.Exec
, which returns all errors. Previously, we never checked for an error inrows
(since I never knew an error would be put there), so it was getting swallowed. We now properly handle those errors.Describe
messages. I noticed in thezachmu/err-handling-repro
branch that the test filetesting/go/prepared_statement_test.go
is inconsistent with the general test framework, as it runs the setup statements usingconn.Query
rather thanconn.Execute
. We don't supportDescribe
at all right now, as GMS currently requires analyzing a statement to determine the output schema, and analyzing some statements produces execution side effects. As a workaround, we start a transaction, execute the query, record the schema, and rollback the transaction. This does not work for any commands that implicitly commit the transaction, so this adds another hack to fake it by running an equivalentDROP
to selectCREATE
statements. This does cause an implicit commit, but it's better than failing for now.