inLogin passed to mysql trigger

(2 posts) (2 voices)

Tags:

No tags yet.

  1. eugfri, Member

    Is there way to access inLogin from inside of a mysql db trigger? Trying to use "after update", "after insert" and "after delete".
    I am using inLogin on my updateable reports and would like to have an audit and the simplest way to implement an audit is db triggers on tables being updated from my report, but inside of the trigger code I only have access to mysql CURRENT_USER() which is the mysql db user used by mydbr to connect to db. But I can't think of a way to access inLogin value.

    Any suggestions please?

    Thank you!
    Eugene

  2. myDBR Team, Key Master

    Triggers are executed inside the database, and myDBR has no access to or knowledge of the trigger or its code.

    The easiest way is to place the audit code before or after the update/delete operations in your myDBR code.

    If you really need it in the trigger, we could add an option to define a user-defined variable (@var) that myDBR would set for each connection to hold the inLogin value. The variable would then be visible in the trigger.

    --
    myDBR Team


Reply

You must log in to post.