Commit 1a13dbff authored by Monty's avatar Monty

MDEV-30327 Client crashes in print_last_query_cost

Fixed by calling init_pager() before tee_fprintf()
parent 8d4bccf3
......@@ -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);
......
......@@ -637,3 +637,6 @@ drop table t1;
WARNING: option '--enable-cleartext-plugin' is obsolete.
1
1
#
# MDEV-30327 Client crashes in print_last_query_cost
#
......@@ -709,10 +709,19 @@ drop table t1;
--echo #
--exec $MYSQL -NHe "select 1 as a"
#
# Test obsolete option --enable-cleartext-plugin
# This should proceed with a warning
#
--echo
--exec $MYSQL test --enable-cleartext-plugin -e "select 1"
--echo #
--echo # MDEV-30327 Client crashes in print_last_query_cost
--echo #
--disable_query_log
--disable_result_log
--exec $MYSQL --show-query-costs --port=$MASTER_MYPORT -e "show tables in mysql like 'foo'"
--enable_result_log
--enable_query_log
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment