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

19 Коммитов

Автор SHA1 Сообщение Дата
Vicent Marti 70ae1a2b3a mysql: add a flag to handle EnableQueryInfo
Signed-off-by: Vicent Marti <vmg@strn.cat>
2022-03-03 17:43:49 +01:00
Vicent Marti b827e21824 mysql: remove the db_collation flag
Signed-off-by: Vicent Marti <vmg@strn.cat>
2022-01-26 11:23:46 +01:00
Florent Poinsard a56fe1d6ff
feat: move collation and collation env to mysql.Conn instead of connParams
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
2021-11-12 11:40:31 +01:00
Florent Poinsard b29b3e62a1 Integration of collation environment in vttablet to use proper charset defaults
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
2021-11-10 19:32:23 +01:00
Florent Poinsard a2eb67a781 Changed vtgate's charset flag to collation flag and propage the information all the way to the tablet
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
2021-11-10 19:32:22 +01:00
Hormoz Kheradmand 8e06dc7f59 Add support for certification revocation list files
Signed-off-by: Hormoz Kheradmand <hormoz.kheradmand@shopify.com>
2021-10-13 17:17:07 +00:00
Dirkjan Bussink a4f7e82481
Add additional options for configuring SSL modes as a client
In the case of for example vttablets connecting to an external MySQL,
the current TLS / SSL options don't provide the sometimes needed
flexibility.

The only way to provide any option(s) is through the `db_flags` and
setting that to the magic value if 2048 (the `CapabilityClientSSL` bit).
In this mode, it immediately moves to the strictest mode possible.

These changes make options available for Vitess users to more granularly
configure the SSL settings. It mimics the MySQL client with an SSL mode
flag that can be set to various values matching MySQL.

This flags replaces the magic constant for db_flags and allows more fine
grained control.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
2021-08-04 12:16:22 +02:00
Dirkjan Bussink 6c14e837d0
Allow for configuration of the minimal TLS version
TLS 1.0 & TLS 1.1 are deprecated and shouldn't be used anymore. There
are however many older MySQL versions out there where the latest 5.6,
5.7 or 8.0 patch release isn't used which means they don't have a build
against OpenSSL with latest TLS support.

This means we can't easily change the minimum version to always be TLS
1.2, but the best possible option is to create flag instead.

The changes here add support for that flag. The default still is TLS
1.2 as the minimum version, but people who run against an older MySQL
can use a new flag to override this and still allow TLS 1.0 or TLS 1.1
if desired.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
2021-07-13 11:39:10 +02:00
Adam Saponara e8b87f9469 Add `-db_connect_timeout_ms` for timing out mysqld conns.
While testing vttablet-mysqld over TCP, we noticed mysql.Connect
sometimes blocks forever if the backend mysqld hit max conns. This
patch adds a timeout to this codepath. It defaults to 0 (no timeout)
for back compatibility.

Signed-off-by: Adam Saponara <as@php.net>
2020-02-24 11:56:57 -05:00
Sugu Sougoumarane 30290b1719 mysql: conn params and flavor specific code
Add Flavor as a conn param.
Add code to handle flavor-specific GTID.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-11 20:14:36 -08:00
yuxiaobo 03e83d6c30 add license in /go file
Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
2019-10-21 22:30:02 +08:00
Michael Demmer 99c600a0e5 add end to end tests for the mysql client warnings support
Signed-off-by: Michael Demmer <mdemmer@slack-corp.com>
2018-10-27 16:18:04 -07:00
Michael Demmer 81c29c6414 restore the deprecated user-specific "dbname" flags
Fix a regression where the dbname flags were removed as part of the
earlier cleanup and refactor. This is against policy since we want
to keep the flags for now.

Unlike the other user-specific db connection flags, this one does
not actually do anything at runtime except set a "DeprecatedDBName"
field in the DBConfig.

Signed-off-by: Michael Demmer <mdemmer@slack-corp.com>
2018-08-06 09:45:08 -07:00
Alain Jobart b29867b7dd Go 1.11 fix for certificate common name.
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>
2018-07-30 11:57:22 -07:00
Sugu Sougoumarane 480e7c66c3 Revert "bug: fail early on invalid connection parameters"
This reverts commit a55ebb0e5b.

This is causing some tests to fail on import. So, I'm reverting
this for now.
2017-06-28 02:33:17 -07:00
Sugu Sougoumarane a55ebb0e5b bug: fail early on invalid connection parameters
If mysql connection parameters are incorrect, the failure happens
late, and it's hard to troubleshoot. This change causes such cases
to fail early with explicit error messages.
2017-06-22 18:22:11 -07:00
Sugu Sougoumarane 9ecaa3c16b mysql: tests for VTGate mysql protocol
Added tests for VTGate mysql protocol. Additonally:
* Removed Engine from ConnParams
* Added an extra test for mid-stream failures in mysql
* Refactored the mysql protocol to allow for dynamic port
2017-06-22 10:47:03 -07:00
Alain Jobart e931f5a158 De-dupping a few constants. 2017-05-18 08:48:25 -07:00
Alain Jobart 6fcf5eec08 Moving ConnParams to go/mysql.
And moving endtoend tests from go/mysql to go/mysql/endtoend.
This breaks the go/vt/vttest circular dependency, and makes the
tests that need a MySQL instance all in the same place, cleaner.
2017-05-18 08:09:31 -07:00