Cannot pt-t-s with GTID

Description

While running pt-t-s between A (source, Google CloudSQL) and B (replica, PXC node), received this error:

Statement violates GTID consistency: CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can only be executed outside transactional context. These statements are also not allowed in a function or trigger because functions and triggers are also considered to be multi-statement transactions. [for Statement "CREATE TEMPORARY TABLE `nhv`.`__maatkit_char_chunking_map` ( `haxid` varchar(255) COLLATE utf8_unicode_ci NOT NULL) ENGINE=MEMORY"] at line 4103 while doing nhv.new_subscriber on 10.148.0.128

Cannot use pt-t-c because Google CloudSQL does not allow SUPER priv. Using pt-t-s is an alternative to checksumming tables where SUPER cannot be used.

Environment

None

Smart Checklist

Activity

Show:

Lalit Choudhary October 1, 2020 at 8:46 AM

Hi

I got a different error for the same table, but it again Writes/DML command which is blocked due to read-only mode.

after disabling the read-only option it works fine for me. So again looking at this case we need to disable read-only mode on target servers which not documented anywhere in pt-table-sycn page.

ref: https://www.percona.com/doc/percona-toolkit/LATEST/pt-table-sync.html

 

Lalit Choudhary September 14, 2020 at 3:21 PM

Google cloud  MYSQL with GTID and pt-table-sync

# ./pt-table-sync h=10.IP ,u=ptuser,p=msandbox h=10.IP ,u=ptuser,p=msandbox --databases test --table t1 --no-check-slave --verbose --print # Syncing h=10.IP,p=...,u=ptuser # DELETE REPLACE INSERT UPDATE ALGORITHM START END EXIT DATABASE.TABLE The MySQL server is running with the --read-only option so it cannot execute this statement [for Statement "SELECT `c1`, COUNT(*) AS __maatkit_count FROM `test`.`t1` WHERE 1=1 GROUP BY `c1` ORDER BY `c1` FOR UPDATE"] at line 6087 while doing test.t1 on 10.44.96.6 # 0 0 0 0 0 14:49:42 14:49:43 1 test.t1

after disabling the read-only option it works fine for me.

#./pt-table-sync h=10.IP,u=ptuser,p=msandbox h=10.IP,u=ptuser,p=msandbox --databases test --table t1 --no-check-slave --verbose --print # Syncing h=10.IP,p=...,u=ptuser # DELETE REPLACE INSERT UPDATE ALGORITHM START END EXIT DATABASE.TABLE # 0 0 0 0 GroupBy 15:13:32 15:13:32 0 test.t1

 

Matthew Boehm September 9, 2020 at 3:34 PM

$ pt-table-sync h=10.73.1.7,u=root,p=XXXXX h=10.148.0.128,u=percona,p=YYYYY --databases core --table trade_histories --channel core --no-check-slave --verbose --print

Lalit Choudhary September 9, 2020 at 10:29 AM

Hi

Thank you for the report.

Could you please add the command you are using? 

 

Details

Assignee

Reporter

Priority

Affects versions

Fix versions

Smart Checklist

Created August 31, 2020 at 5:38 PM
Updated May 17, 2024 at 3:08 PM

Flag notifications