Skip to content
/ server Public
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/mysql.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3622,7 +3622,6 @@ static int com_go(String *buffer, char *)
timer= microsecond_interval_timer();
executing_query= 1;
error= mysql_real_query_for_lazy(buffer->ptr(),buffer->length());
report_progress_end();

#ifdef HAVE_READLINE
if (status.add_to_history)
Expand Down Expand Up @@ -3660,6 +3659,7 @@ static int com_go(String *buffer, char *)
goto end;
}

report_progress_end();
if (verbose >= 3 || !opt_silent)
end_timer(timer, time_buff);
else
Expand Down
31 changes: 31 additions & 0 deletions mysql-test/main/mysql-interactive.result
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,34 @@ Query OK, 0 rows affected
MariaDB [(none)]> exit
Bye
# End of 10.11 tests
#
# MDEV-38922 CLI incorrectly adds "stage done" on REPAIR TABLE output
#
CREATE TABLE t (c INT) ENGINE=InnoDB;
REPAIR TABLE t;
DROP TABLE t;
exit
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is X
Server version: Y
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [test]> CREATE TABLE t (c INT) ENGINE=InnoDB;
Query OK, 0 rows affected

MariaDB [test]> REPAIR TABLE t;
Stage: 2 of 4 'Enabling keys' 0% of stage done +--------+--------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+--------+--------+----------+----------+
| test.t | repair | status | OK |
+--------+--------+----------+----------+
1 row in set

MariaDB [test]> DROP TABLE t;
Query OK, 0 rows affected

MariaDB [test]> exit
Bye
# End of 11.8 tests
Expand Down
31 changes: 27 additions & 4 deletions mysql-test/main/mysql-interactive.test
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# this would need an instrumented ncurses library
source include/not_msan.inc;
source include/not_embedded.inc;
source include/not_windows.inc;
source include/have_innodb.inc;
--echo #
--echo # regression introduced by MDEV-14448
--echo #
source include/not_embedded.inc;
source include/not_windows.inc;
# this would need an instrumented ncurses library
source include/not_msan.inc;

write_file $MYSQL_TMP_DIR/mysql_in;
delimiter $
Expand Down Expand Up @@ -46,3 +47,25 @@ exec socat -t10 EXEC:"$MYSQL",pty STDIO < $MYSQL_TMP_DIR/mysql_in;
remove_file $MYSQL_TMP_DIR/mysql_in;

--echo # End of 10.11 tests

--echo #
--echo # MDEV-38922 CLI incorrectly adds "stage done" on REPAIR TABLE output
--echo #
write_file $MYSQL_TMP_DIR/mysql_in;
CREATE TABLE t (c INT) ENGINE=InnoDB;
REPAIR TABLE t;
DROP TABLE t;
exit
EOF
let TERM=dumb;
replace_regex /id is \d+/id is X/ /Server version: .*/Server version: Y/ / \(\d+\.\d+ sec\)//;
error 0,127;
exec socat -t30 EXEC:"$MYSQL test",pty STDIO < $MYSQL_TMP_DIR/mysql_in;
if ($sys_errno == 127)
{
remove_file $MYSQL_TMP_DIR/mysql_in;
skip no socat;
}
remove_file $MYSQL_TMP_DIR/mysql_in;

--echo # End of 11.8 tests