Commit 8b8fe07
committed
PS-9777: binlog_utils_udf plugin should handle binlog.index entries the same as the server code does
https://perconadev.atlassian.net/browse/PS-9777
Problem:
Some tools like PXB, when moving back a backup, can produce a malformed
binlog.index file. This file contains an entry that is just a binlog
file name without relative/absolute path.
Server is able to handle sucha case in a proper way, however
binlog_utils_udf plugin complains about not being able to find a binlog
file.
Cause:
When the server processes queries like SHOW BINARY LOGS or SHOW BINLOG
EVENTS IN, it does two things:
1. expand provided binlog name to the full binlog path
2. expand entries in binlog.index file to their full path
Then it does comparison (to deduce if the provided binlog file name is
a valid one)
binlog_utils_udf does the expansion of the provided binlog file name,
but gets binlog.index entries as they are. This causes that in
problematic case the entry is not found in binlog.index file causing
the error returned by plugin.
Solution:
Do the full expansion of binlog.index entries in the same way as
the expansion of the provided file name is done.1 parent 2df90d5 commit 8b8fe07
File tree
3 files changed
+73
-8
lines changed- mysql-test
- r
- t
- plugin/binlog_utils_udf
3 files changed
+73
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1655 | 1655 | | |
1656 | 1656 | | |
1657 | 1657 | | |
1658 | | - | |
1659 | 1658 | | |
1660 | | - | |
1661 | 1659 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
341 | | - | |
342 | | - | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
343 | 392 | | |
344 | 393 | | |
345 | 394 | | |
346 | 395 | | |
347 | | - | |
348 | 396 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
171 | 190 | | |
172 | 191 | | |
173 | 192 | | |
| |||
378 | 397 | | |
379 | 398 | | |
380 | 399 | | |
381 | | - | |
| 400 | + | |
382 | 401 | | |
383 | 402 | | |
384 | 403 | | |
| |||
480 | 499 | | |
481 | 500 | | |
482 | 501 | | |
483 | | - | |
| 502 | + | |
484 | 503 | | |
485 | 504 | | |
486 | 505 | | |
| |||
584 | 603 | | |
585 | 604 | | |
586 | 605 | | |
587 | | - | |
| 606 | + | |
588 | 607 | | |
589 | 608 | | |
590 | 609 | | |
| |||
0 commit comments