Skip to content

Commit 19e6001

Browse files
authored
Update mydumper (#48)
* Update mydumper to 0.21.1-1 * Upgrade mydumper to 0.22.2-2 * fix: flush() and quotes as needed in the stream from source to dest * fix: Maybe that \n is needed after all...
1 parent 6c89691 commit 19e6001

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ RUN gpg --keyserver keyserver.ubuntu.com --recv-keys A8D3785C \
88

99
# Install mydumper/myloader
1010
RUN apt-get install -y wget zstd
11-
RUN wget https://github.com/mydumper/mydumper/releases/download/v0.20.1-2/mydumper_0.20.1-2.bookworm_amd64.deb
12-
RUN apt-get install -y ./mydumper_0.20.1-2.bookworm_amd64.deb
11+
RUN wget https://github.com/mydumper/mydumper/releases/download/v0.21.2-2/mydumper_0.21.2-2.bookworm_amd64.deb
12+
RUN apt-get install -y ./mydumper_0.21.2-2.bookworm_amd64.deb
1313

1414
COPY . /app
1515
WORKDIR /app
1616

1717
RUN pip install --upgrade pip
18-
RUN pip install -e ".[dev]"
18+
RUN pip install -e ".[dev]"

aiven_mysql_migrate/migration_executor.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ def _reader_stdout():
8686

8787
LOGGER.debug("dump: %s", processed_line)
8888
self.import_proc.stdin.write(processed_line + "\n")
89+
self.import_proc.stdin.flush()
90+
for handler in logging.getHandlerNames():
91+
logging.getHandlerByName(handler).flush()
92+
sys.stdout.flush()
8993

9094
self.import_proc.stdin.flush()
9195
self.import_proc.stdin.close()

test/sys/test_migration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def test_migration_replication(
8787
assert server_uuid in meta["dump_gtids"]
8888

8989
with dst.cur() as cur:
90-
cur.execute(f"SELECT ID FROM {db_name}.test")
90+
cur.execute(f"SELECT ID FROM `{db_name}`.`test`")
9191
res = cur.fetchall()
9292
assert len(res) == 1 and res[0]["ID"] == "test_data"
9393

0 commit comments

Comments
 (0)