summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorholyfoot/hf@hfmain.(none) <>2008-02-27 13:00:59 +0400
committerholyfoot/hf@hfmain.(none) <>2008-02-27 13:00:59 +0400
commitb727a22d97663663d61062b4ec73c72d818d86e8 (patch)
treea3eef8d4ff9d07ed0b848f3d59a308366a952f5c /libmysql
parent947529acf3f802c23311d3c4bda74713e21a161e (diff)
parent140ca5953815ac1f773ae518cb021783e3334e20 (diff)
downloadmariadb-git-b727a22d97663663d61062b4ec73c72d818d86e8.tar.gz
Merge mysql.com:/home/hf/work/25097/my50-25097
into mysql.com:/home/hf/work/25097/my51-25097
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index f5ac1c09248..a1fb1d8a3c4 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -1500,7 +1500,7 @@ my_ulonglong STDCALL mysql_insert_id(MYSQL *mysql)
const char *STDCALL mysql_sqlstate(MYSQL *mysql)
{
- return mysql->net.sqlstate;
+ return mysql ? mysql->net.sqlstate : cant_connect_sqlstate;
}
uint STDCALL mysql_warning_count(MYSQL *mysql)