summaryrefslogtreecommitdiff
path: root/libmysql/libmysql.c
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@hfmain.(none)>2008-02-27 13:00:59 +0400
committerunknown <holyfoot/hf@hfmain.(none)>2008-02-27 13:00:59 +0400
commit33c4301922112658131e094b3b6b5912c236e90d (patch)
treea3eef8d4ff9d07ed0b848f3d59a308366a952f5c /libmysql/libmysql.c
parent78e19d4283572f1706738980b8242a5e65619caf (diff)
parenta4b0a2cf67356c0f8f80b5291b3c1f4f8327cb97 (diff)
downloadmariadb-git-33c4301922112658131e094b3b6b5912c236e90d.tar.gz
Merge mysql.com:/home/hf/work/25097/my50-25097
into mysql.com:/home/hf/work/25097/my51-25097 client/mysql.cc: Auto merged include/sql_common.h: Auto merged libmysql/libmysql.c: Auto merged libmysqld/lib_sql.cc: Auto merged sql-common/client.c: merging sql/log.cc: merging
Diffstat (limited to 'libmysql/libmysql.c')
-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)