mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
MDEV-13332 mariabackup from 10.2.x crashes with --ftwrl-* options
Fixed null pointer dereference in parsing "show full processlist" output with atoi(). Some Innodb background thread has NULL in 'Time' column, thus backup would crash with when atoi is applied to null pointer.
This commit is contained in:
parent
1b3cf18e4e
commit
013595f56f
2 changed files with 3 additions and 3 deletions
|
@ -724,7 +724,7 @@ have_queries_to_wait_for(MYSQL *connection, uint threshold)
|
|||
all_queries = (opt_lock_wait_query_type == QUERY_TYPE_ALL);
|
||||
while ((row = mysql_fetch_row(result)) != NULL) {
|
||||
const char *info = row[7];
|
||||
int duration = atoi(row[5]);
|
||||
int duration = row[5] ? atoi(row[5]) : 0;
|
||||
char *id = row[0];
|
||||
|
||||
if (info != NULL
|
||||
|
@ -754,7 +754,7 @@ kill_long_queries(MYSQL *connection, time_t timeout)
|
|||
all_queries = (opt_kill_long_query_type == QUERY_TYPE_ALL);
|
||||
while ((row = mysql_fetch_row(result)) != NULL) {
|
||||
const char *info = row[7];
|
||||
long long duration = atoll(row[5]);
|
||||
long long duration = row[5]? atoll(row[5]) : 0;
|
||||
char *id = row[0];
|
||||
|
||||
if (info != NULL &&
|
||||
|
|
|
@ -14,7 +14,7 @@ exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir
|
|||
--enable_result_log
|
||||
INSERT INTO t VALUES(2);
|
||||
SELECT * FROM t;
|
||||
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$incremental_dir --incremental-basedir=$basedir;
|
||||
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --ftwrl-wait-timeout=5 --ftwrl-wait-threshold=300 --ftwrl-wait-query-type=all --target-dir=$incremental_dir --incremental-basedir=$basedir;
|
||||
|
||||
--disable_result_log
|
||||
echo # Prepare full backup, apply incremental one;
|
||||
|
|
Loading…
Add table
Reference in a new issue