Changeset: faa230adb96f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/faa230adb96f
Modified Files:
        monetdb5/mal/mal_authorize.c
        monetdb5/mal/mal_session.c
        sql/backends/monet5/sql_user.c
Branch: triggers
Log Message:

log errors


diffs (43 lines):

diff --git a/monetdb5/mal/mal_authorize.c b/monetdb5/mal/mal_authorize.c
--- a/monetdb5/mal/mal_authorize.c
+++ b/monetdb5/mal/mal_authorize.c
@@ -939,9 +939,9 @@ AUTHRegisterPostLoginTriggersHandler(pos
 str
 AUTHexecPostLoginTriggers(Client c)
 {
-       if ( c && authCallbackCntx.exec_post_login_triggers) {
-               // TODO check for err
-               authCallbackCntx.exec_post_login_triggers(c);
+       if (c && authCallbackCntx.exec_post_login_triggers) {
+               if (authCallbackCntx.exec_post_login_triggers(c) < 0)
+                       throw(MAL, "AUTHexecPostLoginTriggers", 
OPERATION_FAILED);
        }
        return MAL_SUCCEED;
 }
diff --git a/monetdb5/mal/mal_session.c b/monetdb5/mal/mal_session.c
--- a/monetdb5/mal/mal_session.c
+++ b/monetdb5/mal/mal_session.c
@@ -339,8 +339,10 @@ MSscheduleClient(str command, str challe
                        }
                        // post login triggers if any
                        if ((msg=AUTHexecPostLoginTriggers(c)) != MAL_SUCCEED) {
-                               // oh well
+                               mnstr_printf(fout, "!%s\n", msg);
+                               cleanUpScheduleClient(c, scenario, fin, fout, 
&command, &msg);
                                freeException(msg);
+                               return;
                        }
                        cleanUpScheduleClient(c, scenario, NULL, NULL, NULL, 
NULL);
                }
diff --git a/sql/backends/monet5/sql_user.c b/sql/backends/monet5/sql_user.c
--- a/sql/backends/monet5/sql_user.c
+++ b/sql/backends/monet5/sql_user.c
@@ -255,7 +255,7 @@ execPostLoginTriggers(Client c) {
                                        const char *stmt = 
store->table_api.column_find_value(tr, stmtCol, rid);
                                        if ((err = SQLstatementIntern(c, stmt, 
"sql.init", TRUE, FALSE, NULL))) {
                                                (void) sql_error(m, 02, 
SQLSTATE(42000) "%s", err);
-                                               // TODO push err up?
+                                               freeException(err);
                                                res = LOG_ERR;
                                        };
                                }
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to