Граф коммитов

13 Коммитов

Автор SHA1 Сообщение Дата
yuxiaobo 867043971b add license in /go file
Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
2019-10-21 23:25:43 +08:00
yuananf 29fdfca3dc Improve set statements
Signed-off-by: yuananf <yuananf@gmail.com>
2018-05-14 17:04:48 +08:00
Sugu Sougoumarane e30c1e17d5
Merge pull request #3892 from dweitzman/margin_comments
Generalize SplitTrailingComments into SplitMarginComments to preserve…
2018-05-12 08:46:09 -07:00
Sugu Sougoumarane 4f2e0cf710
Merge pull request #3916 from danieltahara/mysqlproxy-transactionmangle
[VTQueryServer] MySQLProxy drops transaction on error
2018-05-11 15:04:19 -07:00
Daniel Tahara 22478350a8 [VTQueryServer] MySQLProxy drops transaction on error
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>
2018-05-10 18:02:19 -07:00
Daniel Tahara 7edf16b224 [VTQueryServer] Fix "set autocommit" handling
If autocommit is already 1, setting it again to 1 shouldn't mess with
transaction state.

Signed-off-by: Daniel Tahara <tahara@dropbox.com>
2018-05-10 16:49:04 -07:00
David Weitzman 4dc454f052 Generalize SplitTrailingComments into SplitMarginComments to preserve leading comments as well.
Signed-off-by: David Weitzman <dweitzman@pinterest.com>
2018-05-05 14:06:51 -07:00
David Weitzman e6b1e31439 Factor out glog references for ease of dropping in an adapter to a different logging library.
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>
2018-04-20 19:40:15 -07:00
Michael Berlin 246e2898d2 Revert "Factor out glog references"
Signed-off-by: Michael Berlin <mberlin@google.com>
2018-04-20 16:44:06 -07:00
David Weitzman b0cedf1b09 Factor out glog references for ease of dropping in an adapter to a different logging library.
Signed-off-by: David Weitzman <dweitzman@pinterest.com>
2018-04-17 08:56:51 -07:00
Sugu Sougoumarane 9d320c1da7 parser: improved handling of SET
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>
2018-03-23 14:36:01 -07:00
Anthony Yeh 6914580ad5
Rewrite imports to new custom URL.
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/,'
```
2018-02-27 12:00:33 -08:00
Michael Demmer a28d1b584f vtqueryserver (#3535)
* 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.
2018-02-07 07:26:42 -08:00