mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-08 11:07:58 +00:00
PT-143 Fixed key handling
When tehre is a table having a key like: PRIMARY KEY (`id`,`start`,`end`,`user_id`(13),`interval`), DBI driver is taking (13) as part of the field name. Fixed the way pt-archiver composes the key using DBI cols field instead of the colnames field since the cols field has the correct field names for the key.
This commit is contained in:
@@ -6294,10 +6294,8 @@ sub main {
|
||||
# this ensures returned sets are disjoint when ran on partitioned tables
|
||||
# issue 1376561
|
||||
my $index_cols;
|
||||
if ( $sel_stmt->{index}
|
||||
&& $src->{info}->{keys}->{$sel_stmt->{index}}->{cols}
|
||||
) {
|
||||
$index_cols = $src->{info}->{keys}->{$sel_stmt->{index}}->{colnames};
|
||||
if ( $sel_stmt->{index} && $src->{info}->{keys}->{$sel_stmt->{index}}->{cols} ) {
|
||||
$index_cols = join(",",map { "`$_`" } @{$src->{info}->{keys}->{$sel_stmt->{index}}->{cols}});
|
||||
}
|
||||
|
||||
foreach my $thing ( $first_sql, $next_sql ) {
|
||||
|
Reference in New Issue
Block a user