[libgda/LIBGDA_4.0] Correction for bug #636219 - MySQL error code ignored and not available via gda_connection_event_get
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda/LIBGDA_4.0] Correction for bug #636219 - MySQL error code ignored and not available via gda_connection_event_get
- Date: Sun, 9 Jan 2011 19:38:09 +0000 (UTC)
commit 180829a40cf929fffda51f5fe88ca3ef3fd0afde
Author: Vivien Malerba <malerba gnome-db org>
Date: Wed Dec 1 19:00:12 2010 +0100
Correction for bug #636219 - MySQL error code ignored and not available via gda_connection_event_get_code
thanks to Piotr Pokora
providers/mysql/gda-mysql-util.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/providers/mysql/gda-mysql-util.c b/providers/mysql/gda-mysql-util.c
index 62fbb39..934964f 100644
--- a/providers/mysql/gda-mysql-util.c
+++ b/providers/mysql/gda-mysql-util.c
@@ -47,7 +47,7 @@ _gda_mysql_make_error (GdaConnection *cnc,
gda_connection_event_set_description
(event_error, mysql_error (mysql));
gda_connection_event_set_code
- (event_error, GDA_CONNECTION_EVENT_CODE_UNKNOWN);
+ (event_error, (glong) mysql_errno (mysql));
g_set_error (error, GDA_SERVER_PROVIDER_ERROR, GDA_SERVER_PROVIDER_STATEMENT_EXEC_ERROR,
"%s", mysql_error (mysql));
@@ -59,7 +59,7 @@ _gda_mysql_make_error (GdaConnection *cnc,
gda_connection_event_set_description
(event_error, mysql_stmt_error (mysql_stmt));
gda_connection_event_set_code
- (event_error, GDA_CONNECTION_EVENT_CODE_UNKNOWN);
+ (event_error, (glong) mysql_stmt_errno (mysql_stmt));
g_set_error (error, GDA_SERVER_PROVIDER_ERROR, GDA_SERVER_PROVIDER_STATEMENT_EXEC_ERROR,
"%s", mysql_stmt_error (mysql_stmt));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]