diff options
author | Tatiana A. Nurnberg <azundris@mysql.com> | 2009-03-23 05:08:32 +0100 |
---|---|---|
committer | Tatiana A. Nurnberg <azundris@mysql.com> | 2009-03-23 05:08:32 +0100 |
commit | e5a599bd73d49b73462e118f9a831cbae2ac4864 (patch) | |
tree | 189507996ee61ac3d2c443781f1a30191c5f9c3f /client | |
parent | 1a7b0ec920bb496019dbbddfabd463f498af34c6 (diff) | |
download | mariadb-git-e5a599bd73d49b73462e118f9a831cbae2ac4864.tar.gz |
Bug#43254: SQL_SELECT_LIMIT=0 crashes command line client
When asking what database is selected, client expected
to *always* get an answer from the server.
We now handle failure more gracefully.
See comments in ticket for a discussion of what happens,
and how things interlock.
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 88ddd40fa68..e035cee16f9 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -2625,7 +2625,7 @@ static void get_current_db() (res= mysql_use_result(&mysql))) { MYSQL_ROW row= mysql_fetch_row(res); - if (row[0]) + if (row && row[0]) current_db= my_strdup(row[0], MYF(MY_WME)); mysql_free_result(res); } |