mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
MDEV-41150 mariadb client: Ctrl-C does not interrupt tab separated result output
Ctrl-C sets interrupted_query and sends KILL QUERY to the server, but the result is already fetched into the client by then, so killing the query cannot stop the output. Only the printing loop can, by checking interrupted_query. print_table_data(), print_table_data_html(), print_table_data_xml() and print_table_data_vertically() check it, print_tab_data() did not, so the output of -s, -N and -B could not be interrupted. Add the same check to print_tab_data(). No test case: the suite drives the client through a pty with socat, where 0x03 is not turned into a signal, and there is no other way in the suite to signal a client while it is printing.
This commit is contained in:
@@ -4491,6 +4491,8 @@ print_tab_data(MYSQL_RES *result)
|
||||
}
|
||||
while ((cur = mysql_fetch_row(result)))
|
||||
{
|
||||
if (interrupted_query)
|
||||
break;
|
||||
lengths=mysql_fetch_lengths(result);
|
||||
field= mysql_fetch_fields(result);
|
||||
if (opt_binhex && is_binary_field(&field[0]))
|
||||
|
||||
Reference in New Issue
Block a user