Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Slack sync upstream 2018.08.09r1 #102

Merged
merged 83 commits into from
Aug 10, 2018
Merged

Conversation

rafael
Copy link

@rafael rafael commented Aug 9, 2018

Description

Monthly upstream sync.

Slack Changes

Other Relevant Changes

dweitzman and others added 30 commits June 13, 2018 20:13
Also, simplify the protoc call by removing some intermediate tools and steps involving the python grpcio-tools wrapper.
The motivation for changing the build was that I had trouble getting the old build to work. It might just have been me.
This approach is arguably simpler because it involves fewer tools, no temp files, and no calling "sed" on the output.

Signed-off-by: David Weitzman <dweitzman@pinterest.com>
Both LIKE and WHERE are allowed in these queries:
https://dev.mysql.com/doc/refman/8.0/en/show-collation.html

Only adding WHERE for the moment because SQLAlchemy uses it in mysqldb.py when checking for UTF8 support.

Signed-off-by: David Weitzman <dweitzman@pinterest.com>
So it works with other RPC implementations.

Signed-off-by: Alain Jobart alainjobart@google.com

Signed-off-by: Alain Jobart <alainjobart@google.com>
Using the configuration error string in this test.
May take a bit for SrvKeyspace to be re-read by vtgate.

Signed-off-by: Alain Jobart <alainjobart@google.com>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
That way it can be customized.

Signed-off-by: Alain Jobart <alainjobart@google.com>
Moving stats variable escaping to its own file.
active-recovery response when it has no history of recovery on that
cluster.

Signed-off-by: Maggie Zhou <mzhou@slack-corp.com>
This parses LOCK TABLES and UNLOCK TABLES statements as "other admin"
statemenets, similar to the handling of OPTIMIZE or REPAIR statements.

Signed-off-by: David Taylor <tinystatemachine@gmail.com>
…n-orc-active-recovery-empty-response

Fix bug found in dev around repairReplication patch in PR vitessio#4024
sqlparser: parse LOCK and UNLOCK TABLES statements
This extends the parser to capture `CONSTRAINT ... FOREIGN KEY...` lines
in table specifications.

Signed-off-by: David Taylor <tinystatemachine@gmail.com>
sqlparser: capture FOREIGN KEY constraints in AST
Cases like `/* a comment */; /* another comment */;` end up becoming
empty statements after the comments are skipped by the lexer, which then
surface as syntax errors.

This changes the parser to return a special, sentinel error value for
empty statements, so a caller wishing to do so can check for and handle
them differently than real syntax errors (e.g. ignore them).

Additionally, `ParseNext` can simply skip empty statements directly.

Cases like the above appear in the default output of `mysqldump`.

Signed-off-by: David Taylor <tinystatemachine@gmail.com>
This mirrors the `StrictDDL` variant of `Parse` allowing callers using
`ParseNext` to also opt into strict handling of DDLs.

Signed-off-by: David Taylor <tinystatemachine@gmail.com>
sqlparser: parse empty statements as nil
sqlparser: add StrictDDL variant of ParseNext
* Introduce new db connectivity flags.
* Mark old flags as deprecated.
* If new flags are set, they supersede legacy flags.
* Provide defaults to existing flags so one doesn't
  have to specify them for normal cases.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
DBConfigs API has been changed:
* Conn param members have been made private and are not changeable.
* New functions like AppWithDB, etc. have been added. They return
  newly allocated conn params.
* New DBName field can now be set by the app, which can then be
  combined with conn params as needed.
* SideCarDBName and DBName are atomic. There's no worry about possible
  race while accessing them.
* 'WithDB' functions return a conn with the db name set. For cases
  where a db is always needed, like App, the API only provides a
  WithDB function. Also, vice-versa.
* A test has been added to tabletmanager to show that the new
  flags work.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
* Remove legacy parameters from examples.
* Add comments.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
It's possible one may want to enable SSL for just the repl
user because replication can happen on open networks.
The per-user use_ssl flag allows you to select which
connections use ssl and which don't.

DBConfigs has been refactored to use a map instead of
hardcoded user configs. This reduces boilerplating.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
nomycnf: simplify db parameters
analyze table was categorized as a DDL in order to store the table
name. However, vttablet code was not expecting fields to be returned
on DDL execution. This caused it to return a result with valid rows,
but empty fields, which caused vtgate to crash.

I've now changed DDL statements to also return fields. For good
measure, I've also changed DMLs to return fields, because there's
no harm.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
vtgate: fix panic on 'analyze table'
Back-porting an internal fix.

Signed-off-by: Alain Jobart <alainjobart@google.com>
sougou and others added 26 commits July 28, 2018 20:11
The endtoend test was failing in mariadb because the error message
returned was different. The operation has now been changed
to something that returns the same message for all flavors.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
…chine

Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
There was a race between releasing and acquiring a sema.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Signed-off-by: longfei <klkyy2018@gmail.com>
Signed-off-by: longfei <klkyy2018@gmail.com>
The test was flaky because frequent restarts of mysql were
causing the relay log to go corrupt. Changed the my.cnf settings
to be more crash-safe.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
update_test was sometimes flaky if replicas were slow.
Changed some checks to accommodate this.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Signed-off-by: longfei <klkyy2018@gmail.com>
Signed-off-by: longfei <klkyy2018@gmail.com>
In go 1.11, common name is ignored when it doesn't parse as a host name.
See this change:
https://go-review.googlesource.com/c/go/+/123355
So we make it look like a host name in tests.

Also add ServerName to MySQL conn parameters, so it can be specified
explicitely, instead of using the defaults always.

Signed-off-by: Alain Jobart <alainjobart@google.com>
Go 1.11 fix for certificate common name.
Signed-off-by: longfei <klkyy2018@gmail.com>
Signed-off-by: longfei <klkyy2018@gmail.com>
support create table like statement
…eing block

Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
nit - formatting issue

Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
@ameetkotian
Copy link

+1

@rafael rafael merged commit ca9a475 into master Aug 10, 2018
@rafael rafael deleted the slack-sync-upstream-2018.08.09r1 branch August 10, 2018 21:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.