Skip to content
  • Shishir Jaiswal's avatar
    60ba7a2d
    Bug#16617026 - AUDIT PLUGIN DOES NOT INCLUDE PREPARED · 60ba7a2d
    Shishir Jaiswal authored
                   STATEMENT PARAMETERS
    
    DESCRIPTION
    ===========
    Audit plugin isn't recording the placeholder's values when
    a Prepared statement is executed. This defies the very
    purpose of the plugin since the values aren't there to be
    reviewed in the audit logs.
    
    ANALYSIS
    ========
    There are 2 versions of functions which insert params in
    case of Prepared statement. One is used to do so by
    generating the expanded query (which could be written to
    logs) and the other does without generating it.
    
    Based on few condition, this is decided in the
    Prepared_statement::setup_set_params() during the PREPARE
    phase itself and the corresponding function is called
    during EXECUTE phase.
    
    FIX
    ===
    Now calling the <functions>_with_log (which generates the
    expanded query) in case audit plugin(s) is/are enabled.
    Achieved this by calling is_global_audit_mask_set(), a
    newly added function to know if even a single audit
    plugin is active or not.
    60ba7a2d
    Bug#16617026 - AUDIT PLUGIN DOES NOT INCLUDE PREPARED
    Shishir Jaiswal authored
                   STATEMENT PARAMETERS
    
    DESCRIPTION
    ===========
    Audit plugin isn't recording the placeholder's values when
    a Prepared statement is executed. This defies the very
    purpose of the plugin since the values aren't there to be
    reviewed in the audit logs.
    
    ANALYSIS
    ========
    There are 2 versions of functions which insert params in
    case of Prepared statement. One is used to do so by
    generating the expanded query (which could be written to
    logs) and the other does without generating it.
    
    Based on few condition, this is decided in the
    Prepared_statement::setup_set_params() during the PREPARE
    phase itself and the corresponding function is called
    during EXECUTE phase.
    
    FIX
    ===
    Now calling the <functions>_with_log (which generates the
    expanded query) in case audit plugin(s) is/are enabled.
    Achieved this by calling is_global_audit_mask_set(), a
    newly added function to know if even a single audit
    plugin is active or not.
Loading