summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorevgen@moonbone.local <>2007-08-14 18:16:34 +0400
committerevgen@moonbone.local <>2007-08-14 18:16:34 +0400
commit1cc8f0e383a9c7e0238feee925ea285afe410fab (patch)
treedb7a4eb8d5cc784b95a10d37f4211d98389b203c /libmysql
parentc40fe57fb544a57d3a2897f61deb7e04cb500e3b (diff)
parent4bc4d834fd194c9008c7abfb4e49972b416194ea (diff)
downloadmariadb-git-1cc8f0e383a9c7e0238feee925ea285afe410fab.tar.gz
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into moonbone.local:/mnt/gentoo64/work/29948-bug-5.0-opt-mysql
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 1a0aae414ed..85c56a7ea40 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -4679,9 +4679,17 @@ int cli_read_binary_rows(MYSQL_STMT *stmt)
MYSQL *mysql= stmt->mysql;
MYSQL_DATA *result= &stmt->result;
MYSQL_ROWS *cur, **prev_ptr= &result->data;
- NET *net = &mysql->net;
+ NET *net;
+
+ if (!mysql)
+ {
+ set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate);
+ return 1;
+ }
+
DBUG_ENTER("cli_read_binary_rows");
+ net = &mysql->net;
mysql= mysql->last_used_con;
while ((pkt_len= cli_safe_read(mysql)) != packet_error)