[MDEV-21317] mysqlhotcopy and transaction_registry table Created: 2019-12-13  Updated: 2020-08-22  Resolved: 2020-02-03

Status: Closed
Project: MariaDB Server
Component/s: Scripts & Clients
Affects Version/s: 10.3
Fix Version/s: 10.3.23, 10.4.13

Type: Bug Priority: Minor
Reporter: Paul Szabo Assignee: Aleksey Midenkov
Resolution: Fixed Votes: 1
Labels: patch, trx-versioning
Environment:

Debian



 Description   

See also (original report):
http://bugs.debian.org/946671

Using mysqlhotcopy, I received the error:

DBD::mysql::db do failed: You can't use locks with log tables at /usr/bin/mysqlhotcopy line 545.

(Your line number may differ: I use my "own" mysqlhotcopy, as per
http://bugs.debian.org/735014 .)

This seems related to the new transaction_registry table
as suggested in
https://mariadb.com/kb/en/library/mysqldump/
that says:
mysqldump in MariaDB 10.3 includes logic to cater for the
mysql.transaction_registry table. ...

My patch for this issue, below.

Cheers, Paul

--- /usr/bin/mysqlhotcopy.OLD   2017-12-26 09:11:27.000000000 +1100
+++ /usr/bin/mysqlhotcopy       2019-12-13 21:10:34.225611502 +1100
@@ -317,8 +317,24 @@
     ## keep in sync with mysqldump.
     if ($db =~ m/^mysql$/i)
     {
+#####
+#      @dbh_base_tables = grep 
+#        { !/^(apply_status|schema|general_log|slow_log)$/ } @dbh_base_tables
+#####
+# PSz 13 Dec 2019
+# Skip transaction_registry also.
+# See also:
+#   https://bugs.mysql.com/bug.php?id=43594
+#   https://bugs.debian.org/574514
+# and see
+#   https://mariadb.com/kb/en/library/mysqldump/
+# that says:
+#   mysqldump in MariaDB 10.3 includes logic to cater for the mysql.transaction_registry table. ...
+# but I guess they forgot about mysqlhotcopy.
+#####
       @dbh_base_tables = grep 
-        { !/^(apply_status|schema|general_log|slow_log)$/ } @dbh_base_tables
+        { !/^(apply_status|schema|general_log|slow_log|transaction_registry)$/ } @dbh_base_tables
+#####
     }
 
     ## generate regex for tables/files


Paul Szabo psz@maths.usyd.edu.au http://www.maths.usyd.edu.au/u/psz/
School of Mathematics and Statistics University of Sydney Australia



 Comments   
Comment by Aleksey Midenkov [ 2020-02-03 ]

Thanks for the contribution! Pushed to 10.3.

Comment by Otto Kekäläinen [ 2020-08-22 ]

Thanks midenok for applying this in https://github.com/mariadb/server/commit/74deeaee342c901c92b91d12033771716a373d8e.patch

The commit however states your name as Author, and real Author is only in commit message. Next time when you apply patches on behalf of somebody else, please use `git commit --author "Paul Szabo <psz@maths.usyd.edu.au>"` (or whatever the next author is). Thanks!

Generated at Thu Feb 08 09:06:13 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.