mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-30327 Client crashes in print_last_query_cost
Fixed by calling init_pager() before tee_fprintf()
This commit is contained in:
@ -4217,7 +4217,10 @@ static void print_last_query_cost()
|
|||||||
|
|
||||||
cur= mysql_fetch_row(result);
|
cur= mysql_fetch_row(result);
|
||||||
if (strtod(cur[1], &end) != 0.0)
|
if (strtod(cur[1], &end) != 0.0)
|
||||||
|
{
|
||||||
|
init_pager();
|
||||||
tee_fprintf(PAGER, "%s: %s\n\n", cur[0], cur[1]);
|
tee_fprintf(PAGER, "%s: %s\n\n", cur[0], cur[1]);
|
||||||
|
}
|
||||||
|
|
||||||
end:
|
end:
|
||||||
mysql_free_result(result);
|
mysql_free_result(result);
|
||||||
|
@ -637,3 +637,6 @@ drop table t1;
|
|||||||
WARNING: option '--enable-cleartext-plugin' is obsolete.
|
WARNING: option '--enable-cleartext-plugin' is obsolete.
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
|
#
|
||||||
|
# MDEV-30327 Client crashes in print_last_query_cost
|
||||||
|
#
|
||||||
|
@ -709,10 +709,19 @@ drop table t1;
|
|||||||
--echo #
|
--echo #
|
||||||
--exec $MYSQL -NHe "select 1 as a"
|
--exec $MYSQL -NHe "select 1 as a"
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Test obsolete option --enable-cleartext-plugin
|
# Test obsolete option --enable-cleartext-plugin
|
||||||
# This should proceed with a warning
|
# This should proceed with a warning
|
||||||
#
|
#
|
||||||
--echo
|
--echo
|
||||||
--exec $MYSQL test --enable-cleartext-plugin -e "select 1"
|
--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
|
||||||
|
Reference in New Issue
Block a user