Description

None

Environment

None

Smart Checklist

hide

Activity

Carlos Salguero February 1, 2023 at 2:38 PM

Hello, 

It seems like the patch was overwritten by the tool to update embedded modules.
Could you please create a new PR modifying the MySQLConfig module and then apply the patch to all the scripts like this:

for t in bin/*; do util/update-modules $t MySQLConfig; done

 

Thanks

DICT Systemen - Universiteit Gent January 25, 2023 at 12:57 PM

It seems, this bug was reintroduced in Percona Toolkit 3.5.1 : https://github.com/percona/percona-toolkit/blob/3.x/bin/pt-config-diff#L3321

if ( my ($num, $factor) = $val =~ m/(\d+)([KMGT])b?$/i ) { my %factor_for = ( k => 1_024, m => 1_048_576, g => 1_073_741_824, t => 1_099_511_627_776, );

it should be : 

if ( my ($num, $factor) = $val =~ m/^(\d+)([KMGT])b?$/i ) {

with a ^ before (\d+)

Can you reapply my PR? Or shall I create a new one again.
How can we avoid that my PR will disappear again in the future?

DICT Systemen - Universiteit Gent January 9, 2019 at 3:40 PM

DICT Systemen - Universiteit Gent January 9, 2019 at 3:04 PM

This problem seems to be caused by this conversion, where the regexp matches any variable with a number followed by K, M, G or T :
 

if ( my ($num, $factor) = $val =~ m/(\d+)([KMGT])b?$/i ) { my %factor_for = ( k => 1_024, m => 1_048_576, g => 1_073_741_824, t => 1_099_511_627_776, ); $val = $num * $factor_for{lc $factor}; }

https://github.com/percona/percona-toolkit/blob/3.0/bin/pt-config-diff#L3247

Lalit Choudhary October 29, 2018 at 1:37 PM

Thank you for the report.

Validated as described. PT version 3.0.12

 

Test:

 

> show variables like 'innodb_temp_data_file_path'; +----------------------------+-----------------------+ | Variable_name | Value | +----------------------------+-----------------------+ | innodb_temp_data_file_path | ibtmp1:12M:autoextend | +----------------------------+-----------------------+ 1 row in set (0.01 sec) $ pt-config-diff my.sandbox.cnf h=localhost,u='msandbox',p='msandbox',S=/tmp/mysql_sandbox5723.sock # A software update is available: 1 config difference Variable my.sandbox.cnf lalit-ThinkPad-T480 ========================= ===================== ===================== innodb_temp_data_file_... ibtmp1:16M:autoextend ibtmp1:12M:autoextend   $ pt-config-diff my.sandbox.cnf h=localhost,u='msandbox',p='msandbox',S=/tmp/mysql_sandbox5723.sock 1 config difference Variable my.sandbox.cnf lalit-ThinkPad-T480 ========================= ============== ===================== innodb_temp_data_file_... 524288000 ibtmp1:12M:autoextend -----mysqld restart-- $ pt-config-diff my.sandbox.cnf h=localhost,u='msandbox',p='msandbox',S=/tmp/mysql_sandbox5723.sock 1 config difference Variable my.sandbox.cnf lalit-ThinkPad-T480 ========================= ============== ============================ innodb_temp_data_file_... 5368709120 ibtmp1:16M:autoextend:max:5G

 

 

Something went wrong on our end

If this keeps happening, share this information with your admin, who should contact support.

Hash 1JOJMU2 Trace 17f8c66b855c4bb9b2392eed00382e33

Details

Assignee

Carlos Salguero(Deactivated)

Reporter

DICT Systemen - Universiteit Gent

Priority

Medium

Affects versions

Fix versions

Smart Checklist Progress

1/1 - Done

Smart Checklist

Flag notifications