summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorunknown <msvensson@devsrv-b.mysql.com>2006-02-15 13:45:03 +0100
committerunknown <msvensson@devsrv-b.mysql.com>2006-02-15 13:45:03 +0100
commit69ede4d9d439e93a72b3468ad16d14da9eef52bf (patch)
tree6bcd658b60445fde0f370a9e51708343e86aac6b /libmysql
parent86c920ba776ddf5e9999e8293d5824be25bb43b6 (diff)
downloadmariadb-git-69ede4d9d439e93a72b3468ad16d14da9eef52bf.tar.gz
Bug#16143 mysql_stmt_sqlstate returns an empty string instead of '00000'
- Init sql_state in mysql_stmt_init libmysql/libmysql.c: Init sql_state to not_error_sql_state in mysql_init tests/mysql_client_test.c: Add test for mysql_stmt_sqlstate after mysql_stmt_init
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 9825f1ecdfa..3ff4cfb4c50 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -2008,6 +2008,7 @@ mysql_stmt_init(MYSQL *mysql)
stmt->mysql= mysql;
stmt->read_row_func= stmt_read_row_no_result_set;
stmt->prefetch_rows= DEFAULT_PREFETCH_ROWS;
+ strmov(stmt->sqlstate, not_error_sqlstate);
/* The rest of statement members was bzeroed inside malloc */
DBUG_RETURN(stmt);