summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index 3fa416330e8..548feb5a1c7 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -4338,7 +4338,7 @@ com_status(String *buffer __attribute__((unused)),
Don't remove "limit 1",
it is protection againts SQL_SELECT_LIMIT=0
*/
- if (mysql_store_result_for_lazy(&result))
+ if (!mysql_store_result_for_lazy(&result))
{
MYSQL_ROW cur=mysql_fetch_row(result);
if (cur)
@@ -4382,7 +4382,7 @@ com_status(String *buffer __attribute__((unused)),
if (mysql_errno(&mysql) == CR_SERVER_GONE_ERROR)
return 0;
}
- if (mysql_store_result_for_lazy(&result))
+ if (!mysql_store_result_for_lazy(&result))
{
MYSQL_ROW cur=mysql_fetch_row(result);
if (cur)
@@ -4477,9 +4477,7 @@ server_version_string(MYSQL *con)
*/
if (server_version == NULL)
- {
- server_version= strdup(mysql_get_server_info(con));
- }
+ server_version= my_strdup(mysql_get_server_info(con), MYF(MY_WME));
}
return server_version ? server_version : "";