Fix crash when 'gtid_executed' is empty

pull/3817/head
Javier Jaramago Fernández 4 years ago
parent d24dfdd6a0
commit b2cfb4eea9

@ -572,7 +572,10 @@ std::string gtid_executed_to_string(gtid_set_t& gtid_executed) {
gtid_set = gtid_set + s2;
}
}
gtid_set.pop_back();
// Extract latest comma only in case 'gtid_executed' isn't empty
if (gtid_set.empty() == false) {
gtid_set.pop_back();
}
return gtid_set;
}

Loading…
Cancel
Save