Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql/server: add PreHandleFunc hook for connections #7513

Merged
merged 1 commit into from
Feb 20, 2021

Conversation

fatih
Copy link
Member

@fatih fatih commented Feb 18, 2021

This PR adds a new PreHandleFunc field to the Listener struct. The
the goal of this hook is to inspect the connection or add a custom
TLS termination. Because MySQL does TLS termination differently, it'll
allow us to terminate first and then let the handler continue processing
the connection according to the MySQL protocol.

I initially wanted it to make a part of the Handler interface, but
that would be a breaking change. If we're ok breaking it, I can make it
part of the handler.

@fatih fatih force-pushed the fatih/add-pre-handle-hook branch from 54e571f to 32b90f6 Compare February 18, 2021 13:03
go/mysql/server.go Outdated Show resolved Hide resolved
This PR adds a new `PreHandleFunc` field to the Listener struct. The
goal of this hook is to inspect the connection or add a custom
TLS termination. Because  MySQL does TLS termination differently, it'll
allow us to terminate first and then let the handler continue processing
the connection according to the MySQL protocol.

I iniatally wanted it to make a part of the `Handler` interface, but
that would be breaking change. If we're ok breaking it, I can make it
part of the handler.

Signed-off-by: Fatih Arslan <[email protected]>
@fatih fatih force-pushed the fatih/add-pre-handle-hook branch from 0467f38 to 517e373 Compare February 18, 2021 14:26
@deepthi deepthi merged commit ae051e1 into vitessio:master Feb 20, 2021
@deepthi deepthi deleted the fatih/add-pre-handle-hook branch February 20, 2021 17:50
@askdba askdba added this to the v10.0 milestone Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants