From 8ece9de8331798c3fefceebe72e43b1c40d06a99 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 26 Jan 2014 21:49:31 +0100 Subject: [PATCH] workaround test failures in buildbot: in some VMs readline thinks that the window size is zero. ignore it. --- client/mysql.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/mysql.cc b/client/mysql.cc index c2bfdce2f74..5e4e80373ad 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1408,7 +1408,8 @@ sig_handler window_resize(int sig) struct winsize window_size; if (ioctl(fileno(stdin), TIOCGWINSZ, &window_size) == 0) - terminal_width= window_size.ws_col; + if (window_size.ws_col > 0) + terminal_width= window_size.ws_col; } #endif