Skip to content

Commit 9e65ce4

Browse files
committed
change config name in readme
1 parent 60636c2 commit 9e65ce4

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ import (
6262
"github.com/go-mysql-org/go-mysql/replication"
6363
"os"
6464
)
65-
// Create a binlog syncer with a unique server id, the server id must be different from other MySQL's.
65+
// Create a binlog syncer with a unique server id, the server id must be different from other MySQL's.
6666
// flavor is mysql or mariadb
6767
cfg := replication.BinlogSyncerConfig {
6868
ServerID: 100,
@@ -137,7 +137,7 @@ Query: DROP TABLE IF EXISTS `test_replication` /* generated by server */
137137

138138
MariaDB 11.4+ introduced an optimization where events written through transaction or statement cache have `LogPos=0` so they can be copied directly to the binlog without computing the real end position. This optimization improves performance but makes position tracking unreliable for replication clients that need to track LogPos of events inside transactions.
139139

140-
To address this, a `MariaDBDynamicLogPos` configuration option is available:
140+
To address this, a `FillZeroLogPos` configuration option is available:
141141

142142
```go
143143
cfg := replication.BinlogSyncerConfig {
@@ -148,24 +148,24 @@ cfg := replication.BinlogSyncerConfig {
148148
User: "root",
149149
Password: "",
150150
// Enable dynamic LogPos calculation for MariaDB 11.4+
151-
MariaDBDynamicLogPos: true,
151+
FillZeroLogPos: true,
152152
}
153153
```
154154

155155
**Behavior:**
156-
- When `MariaDBDynamicLogPos` is `true` and flavor is `mariadb`, the library automatically:
156+
- When `FillZeroLogPos` is `true` and flavor is `mariadb`, the library automatically:
157157
- Adds `BINLOG_SEND_ANNOTATE_ROWS_EVENT` flag to binlog dump commands. This ensures correct position tracking by making the server send `ANNOTATE_ROWS_EVENT` events which are needed for accurate position calculation.
158-
- Calculates LogPos dynamically for events with `LogPos=0` that are not artificial.
158+
- Calculates LogPos dynamically for events with `LogPos=0` that are not artificial.
159159
- Only works with MariaDB flavor; has no effect with MySQL.
160160
- Should be set to `true` if tracking of LogPos inside transactions is required.
161161

162162
## Canal
163163

164164
Canal is a package that can sync your MySQL into everywhere, like Redis, Elasticsearch.
165165

166-
First, canal will dump your MySQL data then sync changed data using binlog incrementally.
166+
First, canal will dump your MySQL data then sync changed data using binlog incrementally.
167167

168-
You must use ROW format for binlog, full binlog row image is preferred, because we may meet some errors when primary key changed in update for minimal or noblob row image.
168+
You must use ROW format for binlog, full binlog row image is preferred, because we may meet some errors when primary key changed in update for minimal or noblob row image.
169169

170170
A simple example:
171171

@@ -214,9 +214,9 @@ You can see [go-mysql-elasticsearch](https://github.com/go-mysql-org/go-mysql-el
214214

215215
## Client
216216

217-
Client package supports a simple MySQL connection driver which you can use it to communicate with MySQL server.
217+
Client package supports a simple MySQL connection driver which you can use it to communicate with MySQL server.
218218

219-
For an example see [`example_client_test.go`](client/example_client_test.go). You can run this testable example with
219+
For an example see [`example_client_test.go`](client/example_client_test.go). You can run this testable example with
220220
`go test -v ./client -run Example`.
221221

222222
Tested MySQL versions for the client include:
@@ -263,7 +263,7 @@ conn.Execute() / conn.Begin() / etc...
263263

264264
## Server
265265

266-
Server package supplies a framework to implement a simple MySQL server which can handle the packets from the MySQL client.
266+
Server package supplies a framework to implement a simple MySQL server which can handle the packets from the MySQL client.
267267
You can use it to build your own MySQL proxy. The server connection is compatible with MySQL 5.5, 5.6, 5.7, and 8.0 versions,
268268
so that most MySQL clients should be able to connect to the Server without modifications.
269269

@@ -519,7 +519,7 @@ We pass all tests in https://github.com/bradfitz/go-sql-test using go-mysql driv
519519

520520
Logging uses [log/slog](https://pkg.go.dev/log/slog) and by default is sent to standard out.
521521

522-
For the old logging package `github.com/siddontang/go-log/log`, a converting package
522+
For the old logging package `github.com/siddontang/go-log/log`, a converting package
523523
`https://github.com/serprex/slog-siddontang` is available.
524524
## How to migrate to this repo
525525
To change the used package in your repo it's enough to add this `replace` directive to your `go.mod`:

0 commit comments

Comments
 (0)