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: Refactor dependencies #13688

Merged

Commits on Aug 4, 2023

  1. mysql: Refactor dependencies

    This starts splitting up the large `mysql` package into various
    subpackages that can handle more specific cases. The first is to extract
    replication concerns and sqlerror.
    
    These two packages now deal with parsing of GTIDs, positions and
    replication status and the latter with all the MySQL level error types.
    
    With this split, `vtorc` can actually build without loading in all the
    collations information as it doesn't actually need any of that. Before
    it was pulled in because it would need `go/mysql` for replication and
    error information.
    
    We can still further split off some main concerns, such as a
    `go/mysql/flavor` package and a `go/mysql/conn` package to split off
    specific bits for flavor detection and the actual MySQL connection.
    
    Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
    dbussink committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    0665325 View commit details
    Browse the repository at this point in the history
  2. evalengine: Refactor out int conversion functions

    The `ToInt64` and `ToUint64` conversion functions end up loading the
    whole evalengine in many places, even though only the conversion is
    needed.
    
    Instead we move this as a function to `sqltypes.Value` itself. The
    casting logic to best effort convert a type to those is the same as
    depending on the full `evalengine` logic to do it. It's much simpler
    though and removes the dependency from many places.
    
    Additionally this moves a few more bits to the sidecar constants with
    some utility functions. This allows us to decouple `mysqlctl` fully from
    the `evalengine` as well.
    
    Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
    dbussink committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    5ffd09e View commit details
    Browse the repository at this point in the history
  3. Fix licenses

    Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
    dbussink committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    f1a1ef6 View commit details
    Browse the repository at this point in the history