diff options
author | unknown <kostja@bodhi.(none)> | 2007-10-31 17:16:53 +0300 |
---|---|---|
committer | unknown <kostja@bodhi.(none)> | 2007-10-31 17:16:53 +0300 |
commit | 70987ab97c76c1268b79486758c44ccd6a6ce254 (patch) | |
tree | 2395708495228dc2d69186cc12b03de5b83d7bec /include/sql_common.h | |
parent | 1430f4ded275728ed747ebe48005c01b40cd3bab (diff) | |
download | mariadb-git-70987ab97c76c1268b79486758c44ccd6a6ce254.tar.gz |
Cleanup: use helper functions to set an error in MYSQL or MYSQL_STMT.
No functionality added or changed.
This is a pre-requisite for the fix for Bug#12713 Error in a stored
function called from a SELECT doesn't cause ROLLBACK of statem
Address post-review comments.
include/sql_common.h:
Declare auxiliary functions to manipulate mysql.net.last_er* and
mysql_stmt.last_er*
libmysql/libmysql.c:
Use helper functions to set an error in MYSQL or MYSQL_STMT
libmysqld/lib_sql.cc:
Use helper functions to set an error in MYSQL or MYSQL_STMT
sql-common/client.c:
Use helper functions to set an error in MYSQL or MYSQL_STMT
Diffstat (limited to 'include/sql_common.h')
-rw-r--r-- | include/sql_common.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/sql_common.h b/include/sql_common.h index 80504140fae..56e7305130f 100644 --- a/include/sql_common.h +++ b/include/sql_common.h @@ -36,8 +36,10 @@ cli_advanced_command(MYSQL *mysql, enum enum_server_command command, const unsigned char *arg, ulong arg_length, my_bool skip_check, MYSQL_STMT *stmt); unsigned long cli_safe_read(MYSQL *mysql); -void set_stmt_errmsg(MYSQL_STMT * stmt, const char *err, int errcode, - const char *sqlstate); +void net_clear_error(NET *net); +void set_stmt_errmsg(MYSQL_STMT *stmt, NET *net); +void set_stmt_error(MYSQL_STMT *stmt, int errcode, const char *sqlstate, + const char *err); void set_mysql_error(MYSQL *mysql, int errcode, const char *sqlstate); #ifdef __cplusplus } |