diff options
author | Monty <monty@mariadb.org> | 2023-01-05 15:43:14 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2023-02-10 12:58:50 +0200 |
commit | 1a13dbff0175d74a0304d23b0d9e5624a982db74 (patch) | |
tree | 94f0bfd674904df4f74b5ed8954bdc9d1efc07e3 /client | |
parent | 8d4bccf338fbb7d55bc7e2b2896b5eb01903b0ca (diff) | |
download | mariadb-git-1a13dbff0175d74a0304d23b0d9e5624a982db74.tar.gz |
MDEV-30327 Client crashes in print_last_query_cost
Fixed by calling init_pager() before tee_fprintf()
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index a39bf36c016..9971410c0d8 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -4217,7 +4217,10 @@ static void print_last_query_cost() cur= mysql_fetch_row(result); if (strtod(cur[1], &end) != 0.0) + { + init_pager(); tee_fprintf(PAGER, "%s: %s\n\n", cur[0], cur[1]); + } end: mysql_free_result(result); |