Commit 63aebfe5 authored by unknown's avatar unknown

Fix for the bug #1336 mysql.cc assumes DATABASE() doesn't return NULL

parent fed70100
...@@ -2328,7 +2328,7 @@ com_status(String *buffer __attribute__((unused)), ...@@ -2328,7 +2328,7 @@ com_status(String *buffer __attribute__((unused)),
(result=mysql_use_result(&mysql))) (result=mysql_use_result(&mysql)))
{ {
MYSQL_ROW cur=mysql_fetch_row(result); MYSQL_ROW cur=mysql_fetch_row(result);
tee_fprintf(stdout, "Current database:\t%s\n",cur[0]); tee_fprintf(stdout, "Current database:\t%s\n", cur[0] ? cur[0] : "");
tee_fprintf(stdout, "Current user:\t\t%s\n",cur[1]); tee_fprintf(stdout, "Current user:\t\t%s\n",cur[1]);
(void) mysql_fetch_row(result); // Read eof (void) mysql_fetch_row(result); // Read eof
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment