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

dumpling: Support for MySQL 8.4.0 #53082

Open
3 tasks
dveeden opened this issue May 7, 2024 · 1 comment
Open
3 tasks

dumpling: Support for MySQL 8.4.0 #53082

dveeden opened this issue May 7, 2024 · 1 comment
Labels
compatibility-mysql8 This is a compatibility issue with MySQL 8.0(but NOT 5.7) component/dumpling This is related to Dumpling of TiDB. type/compatibility type/enhancement

Comments

@dveeden
Copy link
Contributor

dveeden commented May 7, 2024

Enhancement

dumpling/export/metadata.go:		buffer.WriteString("SHOW MASTER STATUS:")
dumpling/export/metadata.go:	// mysql> SHOW MASTER STATUS;
dumpling/export/metadata.go:	// mysql> SHOW MASTER STATUS;
dumpling/export/metadata.go:	// SHOW MASTER STATUS;
dumpling/export/sql.go:// ShowMasterStatus get SHOW MASTER STATUS result from database
dumpling/export/sql.go:	const showMasterStatusQuery = "SHOW MASTER STATUS"
2024-05-07T09:53:25.5313474Z [2024/05/07 09:53:25.531 +00:00] [INFO] [dump.go:204] ["get global metadata failed"] [error="sql: SHOW MASTER STATUS: sql: SHOW MASTER STATUS, args: []: Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MASTER STATUS' at line 1"]
  • Replace SHOW MASTER STATUS with SHOW BINARY LOG STATUS
  • Replace SHOW SLAVE STATUS with SHOW REPLICA STATUS
  • Update CI with MySQL 8.4.0
@dveeden dveeden added type/enhancement type/compatibility component/dumpling This is related to Dumpling of TiDB. compatibility-mysql8 This is a compatibility issue with MySQL 8.0(but NOT 5.7) labels May 7, 2024
@dveeden
Copy link
Contributor Author

dveeden commented May 10, 2024

podman run -p 3307:3306 --env MYSQL_ALLOW_EMPTY_PASSWORD=1 -it mysql:8.4.0
$ ./bin/dumpling -P 3307 -u root -o /tmp/dumpling_$(date +%s); find /tmp/dumpling_*
Release version: v8.2.0-alpha-119-g341503b0a8
Git commit hash: 341503b0a8b083e3506c3d27649bebe46293e4bf
Git branch:      master
Build timestamp: 2024-05-10 06:04:05Z
Go version:      go version go1.22.2 linux/amd64

[2024/05/10 08:10:35.922 +02:00] [INFO] [versions.go:54] ["Welcome to dumpling"] ["Release Version"=v8.2.0-alpha-119-g341503b0a8] ["Git Commit Hash"=341503b0a8b083e3506c3d27649bebe46293e4bf] ["Git Branch"=master] ["Build timestamp"="2024-05-10 06:04:05"] ["Go Version"="go version go1.22.2 linux/amd64"]
[2024/05/10 08:10:36.008 +02:00] [WARN] [version.go:333] ["select tidb_version() failed, will fallback to 'select version();'"] [error="Error 1046 (3D000): No database selected"]
[2024/05/10 08:10:36.009 +02:00] [INFO] [version.go:440] ["detect server version"] [type=MySQL] [version=8.4.0]
[2024/05/10 08:10:36.093 +02:00] [INFO] [dump.go:151] ["begin to run Dump"] [conf="{\"s3\":{\"endpoint\":\"\",\"region\":\"\",\"storage-class\":\"\",\"sse\":\"\",\"sse-kms-key-id\":\"\",\"acl\":\"\",\"access-key\":\"\",\"secret-access-key\":\"\",\"session-token\":\"\",\"provider\":\"\",\"force-path-style\":true,\"use-accelerate-endpoint\":false,\"role-arn\":\"\",\"external-id\":\"\",\"object-lock-enabled\":false},\"gcs\":{\"endpoint\":\"\",\"storage-class\":\"\",\"predefined-acl\":\"\",\"credentials-file\":\"\"},\"azblob\":{\"endpoint\":\"\",\"account-name\":\"\",\"account-key\":\"\",\"access-tier\":\"\",\"sas-token\":\"\",\"encryption-scope\":\"\",\"encryption-key\":\"\"},\"SpecifiedTables\":false,\"AllowCleartextPasswords\":false,\"SortByPk\":true,\"NoViews\":true,\"NoSequences\":true,\"NoHeader\":false,\"NoSchemas\":false,\"NoData\":false,\"CompleteInsert\":false,\"TransactionalConsistency\":true,\"EscapeBackslash\":true,\"DumpEmptyDatabase\":true,\"PosAfterConnect\":false,\"CompressType\":0,\"Host\":\"127.0.0.1\",\"Port\":3307,\"Threads\":4,\"User\":\"root\",\"Security\":{\"CAPath\":\"\",\"CertPath\":\"\",\"KeyPath\":\"\"},\"LogLevel\":\"info\",\"LogFile\":\"\",\"LogFormat\":\"text\",\"OutputDirPath\":\"/tmp/dumpling_1715321435\",\"StatusAddr\":\":8281\",\"Snapshot\":\"\",\"Consistency\":\"flush\",\"CsvNullValue\":\"\\\\N\",\"SQL\":\"\",\"CsvSeparator\":\",\",\"CsvDelimiter\":\"\\\"\",\"CsvLineTerminator\":\"\\r\\n\",\"Databases\":[],\"Where\":\"\",\"FileType\":\"sql\",\"ServerInfo\":{\"ServerType\":1,\"ServerVersion\":\"8.4.0\",\"HasTiKV\":false},\"Rows\":0,\"ReadTimeout\":900000000000,\"TiDBMemQuotaQuery\":0,\"FileSize\":0,\"StatementSize\":1000000,\"SessionParams\":{},\"Tables\":{},\"CollationCompatible\":\"loose\",\"CsvOutputDialect\":0,\"IOTotalBytes\":null,\"Net\":\"\"}"]
[2024/05/10 08:10:36.140 +02:00] [INFO] [dump.go:204] ["get global metadata failed"] [error="sql: SHOW MASTER STATUS: sql: SHOW MASTER STATUS, args: []: Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MASTER STATUS' at line 1"]
[2024/05/10 08:10:36.500 +02:00] [INFO] [dump.go:275] ["All the dumping transactions have started. Start to unlock tables"]
[2024/05/10 08:10:36.500 +02:00] [INFO] [collector.go:264] ["backup success summary"] [total-ranges=0] [ranges-succeed=0] [ranges-failed=0] [total-take=121.438µs]
[2024/05/10 08:10:36.501 +02:00] [INFO] [main.go:82] ["dump data successfully, dumpling will exit now"]

Should the dump be considered succesfull if the "get global metadata" step failed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility-mysql8 This is a compatibility issue with MySQL 8.0(but NOT 5.7) component/dumpling This is related to Dumpling of TiDB. type/compatibility type/enhancement
Projects
None yet
Development

No branches or pull requests

1 participant