Syntax Error with `SOURCE_LOG_FILE` in `CHANGE REPLICATION SOURCE TO` Command
- Dominant language
- Go
- Stars
- 24.4k
- Forks
- 873
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 108
Description
**Description:**
A syntax error occurs when executing a replication query, specifically at position 141 near `SOURCE_LOG_FILE`. This error prevents the query from executing successfully, resulting in a warning log entry.
**Error Details:**
```
WARN[2796] error running query
connectTime="2024-10-31 13:54:16.815824 +0800 CST m=+7.077709710"
connectionDb= connectionID=1
error="syntax error at position 141 near 'SOURCE_LOG_FILE'"
query="CHANGE REPLICATION SOURCE TO SOURCE_HOST='127.0.0.1', SOURCE_USER='root', SOURCE_PASSWORD='root', SOURCE_PORT=16345, SOURCE_LOG_FILE='binlog.000047', SOURCE_LOG_POS=157"
```
**Steps to Reproduce:**
1. Execute the following replication command:
```sql
CHANGE REPLICATION SOURCE TO
SOURCE_HOST='127.0.0.1',
SOURCE_USER='root',
SOURCE_PASSWORD='root',
SOURCE_PORT=16345,
SOURCE_LOG_FILE='binlog.000047',
SOURCE_LOG_POS=157;
```
2. Observe the syntax error near `SOURCE_LOG_FILE`.
**Expected Behavior:**
The replication command should execute without any syntax errors, allowing replication to start as intended.
**Actual Behavior:**
The command fails with a syntax error, specifically indicating an issue near `SOURCE_LOG_FILE`.
**Additional Context:**
It appears that AWS RDS for MySQL and Azure Database for MySQL do not enable GTID by default, making support for `SOURCE_LOG_FILE` essential for proper replication setup.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.