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

Compression / Format Support Differences for MySQL/MariaDB #6

Open
jmealo opened this issue Jan 15, 2024 · 0 comments
Open

Compression / Format Support Differences for MySQL/MariaDB #6

jmealo opened this issue Jan 15, 2024 · 0 comments

Comments

@jmealo
Copy link

jmealo commented Jan 15, 2024

Hello,

I'm dusting off https://github.com/JarvusInnovations/lapidus which made use of zongji and have landed on using your fork. Thank you for your work. I just wanted to drop this here in case anyone is interested in what the library supports (correct me if I'm wrong)

Supported

  • ROW binlog format
  • MariaDB compression

Not supported

  • zstd compression (MySQL)
  • MIXED binlog format
  • STATEMENT binlog format

Here's a docker-compose.yaml file that I used to test the various permutations as quickly as possible:

version: '2'

services:
  # compression doesn't appear to work
  mariadb-mixed-compressed:
    image: mariadb:latest
    environment:
      MARIADB_ROOT_PASSWORD: lapidus
      MARIADB_USER: lapidus
      MARIADB_PASSWORD: lapidus
      MARIADB_DATABASE: lapidus
    command: --binlog-format=MIXED --log-bin-trust-function-creators=1 --log_bin_compress=ON --log_bin=ON --log-basename=mariadb-mixed-compressed
    ports:
      - "3311:3306"
    volumes:
      - ./init/mysql.sql:/docker-entrypoint-initdb.d/01-test.sql

  # mixed doesn't appear to work
  mariadb-mixed-uncompressed:
    image: mariadb:latest
    environment:
      MARIADB_ROOT_PASSWORD: lapidus
      MARIADB_USER: lapidus
      MARIADB_PASSWORD: lapidus
      MARIADB_DATABASE: lapidus
    command: --binlog-format=MIXED --log-bin-trust-function-creators=1 --log_bin_compress=OFF --log_bin=ON --log-basename=mariadb-mixed-uncompressed
    ports:
      - "3312:3306"
    volumes:
      - ./init/mysql.sql:/docker-entrypoint-initdb.d/01-test.sql

  # compression works with mariadb
  mariadb-row-compressed:
    image: mariadb:latest
    environment:
      MARIADB_ROOT_PASSWORD: lapidus
      MARIADB_USER: lapidus
      MARIADB_PASSWORD: lapidus
      MARIADB_DATABASE: lapidus
    command: --binlog-format=ROW --log-bin-trust-function-creators=1 --log_bin_compress=ON --log_bin=ON --log-basename=mariadb-row-compressed
    ports:
      - "3313:3306"
    volumes:
      - ./init/mysql.sql:/docker-entrypoint-initdb.d/01-test.sql

  # uncompressed works with mariadb
  mariadb-row-uncompressed:
    image: mariadb:latest
    environment:
      MARIADB_ROOT_PASSWORD: lapidus
      MARIADB_USER: lapidus
      MARIADB_PASSWORD: lapidus
      MARIADB_DATABASE: lapidus
    command: --binlog-format=ROW --log-bin-trust-function-creators=1 --log_bin=ON --log-basename=mariadb-row-uncompressed
    ports:
      - "3314:3306"
    volumes:
      - ./init/mysql.sql:/docker-entrypoint-initdb.d/01-test.sql

  # statement doesn't appear to work
  mariadb-statement-compressed:
    image: mariadb:latest
    environment:
      MARIADB_ROOT_PASSWORD: lapidus
      MARIADB_USER: lapidus
      MARIADB_PASSWORD: lapidus
      MARIADB_DATABASE: lapidus
    command: --binlog-format=STATEMENT --log-bin-trust-function-creators=1 --log_bin_compress=ON --log_bin=ON --log-basename=mariadb-statement-compressed
    ports:
      - "3315:3306"
    volumes:
      - ./init/mysql.sql:/docker-entrypoint-initdb.d/01-test.sql

  # statement doesn't appear to work
  mariadb-statement-uncompressed:
    image: mariadb:latest
    environment:
      MARIADB_ROOT_PASSWORD: lapidus
      MARIADB_USER: lapidus
      MARIADB_PASSWORD: lapidus
      MARIADB_DATABASE: lapidus
    command: --binlog-format=STATEMENT --log-bin-trust-function-creators=1 --log_bin_compress=OFF --log_bin=ON --log-basename=mariadb-statement-uncompressed
    ports:
      - "3316:3306"
    volumes:
      - ./init/mysql.sql:/docker-entrypoint-initdb.d/01-test.sql

  # No events are being emitted when using compression
  mysql-row-compressed:
    image: mysql:latest
    environment:
      MYSQL_ROOT_PASSWORD: lapidus
      MYSQL_USER: lapidus
      MYSQL_PASSWORD: lapidus
      MYSQL_DATABASE: lapidus
    command: --binlog-format=ROW --binlog_transaction_compression=ON --log_bin=ON
    ports:
      - "3321:3306"
    volumes:
      - ./init/mysql.sql:/docker-entrypoint-initdb.d/01-test.sql

  # row works with mysql
  mysql-row-uncompressed:
    image: mysql:latest
    environment:
      MYSQL_ROOT_PASSWORD: lapidus
      MYSQL_USER: lapidus
      MYSQL_PASSWORD: lapidus
      MYSQL_DATABASE: lapidus
    command: --binlog-format=ROW --binlog_transaction_compression=OFF --log_bin=ON --default-authentication-plugin=mysql_native_password
    ports:
      - "3322:3306"
    volumes:
      - ./init/mysql.sql:/docker-entrypoint-initdb.d/01-test.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant