It's totally valid to have an error mid-transaction and then continue to
act on the transaction. Unfortunately, the vtqueryserver mysql plugin
handler drops the transaction ID (vis a vis ProxySession) on error.
Signed-off-by: Daniel Tahara <tahara@dropbox.com>
Note: This is the revert of a temporary revert and has the same effect
as the original PR: https://github.com/vitessio/vitess/pull/3830
Revert "Revert "Factor out glog references""
This reverts commit 246e2898d2.
Signed-off-by: David Weitzman <dweitzman@pinterest.com>
This change improves the handling of constructs like
SET NAMES and SET CHARSET. It allows intermixing of
these with other assignments.
VTGate and mysqlproxy have been correspondingly updated.
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
This commit consists only of the changes from running the following:
```
find go -name '*.go' | xargs -n 10 -- sed -i -r -e \
's,"github.com/youtube/vitess/go/,"vitess.io/vitess/go/,'
```
* add an error log if creating the app connection fails
* add a reusable mysqlproxy module
Modeling after the vtgate mysql server implementation, add a simple
module that implements the mysql server protocol handlers and
proxies all requests to the appropriate methods in a queryservice
backend.
This includes optional support for query normalization.
* add vtqueryserver
Add a binary to wrap a standalone queryservice with a grpc service
interface and a mysql server implementation using the mysqlproxy
module to direct to the queryservice.
* resolve upstream conflict
* refactor vtqueryserver startup to enable testing
* add initial end to end test for vtqueryserver
* rework the proxy implementation of autocommit to match mysql
Following the example of vtgate, add support to set autocommit on
or off in the session, update the execution path to use ExecuteBatch
for single round-trip autocommit semantics, and add tests to ensure
the behavior matches mysql.
* add accessors to set PassthroughDMLs and AllowUnsafeDMLs
* add vtqueryserver tests for passthrough DMLs
* add vtqueryserver flag for allow_unsafe_dmls
* add proxy support for other statements
This allows EXPLAIN and other such statements to go through without
query normalization.
* remove debugging printf
* add correct handling for BEGIN..BEGIN and more tests
As suggested in PR review, a BEGIN statement in an existing
transaction needs to commit the first one.
Add tests for this case and the case where transitioning from
autocommit=0 to autocommit=1.