24#ifndef __M_SQL_TRACE_H__
25#define __M_SQL_TRACE_H__
29#include <mstdlib/base/m_defs.h>
30#include <mstdlib/base/m_types.h>
31#include <mstdlib/sql/m_sql.h>
32#include <mstdlib/sql/m_sql_stmt.h>
91struct M_sql_trace_data;
struct M_sql_connpool M_sql_connpool_t
Definition: m_sql.h:335
M_sql_error_t
Definition: m_sql.h:190
struct M_sql_stmt M_sql_stmt_t
Definition: m_sql_stmt.h:46
struct M_sql_trace_data M_sql_trace_data_t
Definition: m_sql_trace.h:93
size_t M_sql_trace_get_result_row_count(const M_sql_trace_data_t *data)
void M_sql_trace_ignore_tranfail(M_sql_stmt_t *stmt)
M_bool M_sql_trace_get_has_result_rows(const M_sql_trace_data_t *data)
void M_sql_connpool_trace_stalls(M_sql_connpool_t *pool, M_uint64 max_query_s, M_uint64 max_trans_idle_s, M_uint64 max_trans_s)
const char * M_sql_trace_get_query_user(const M_sql_trace_data_t *data)
size_t M_sql_trace_get_conn_id(const M_sql_trace_data_t *data)
const char * M_sql_trace_get_error_string(const M_sql_trace_data_t *data)
void(* M_sql_trace_cb_t)(M_sql_trace_t event_type, const M_sql_trace_data_t *data, void *arg)
Definition: m_sql_trace.h:102
M_sql_conn_type_t
Definition: m_sql_trace.h:83
M_sql_trace_t
Definition: m_sql_trace.h:47
M_bool M_sql_connpool_add_trace(M_sql_connpool_t *pool, M_sql_trace_cb_t cb, void *cb_arg)
const char * M_sql_trace_get_query_prepared(const M_sql_trace_data_t *data)
M_uint64 M_sql_trace_get_total_duration_ms(const M_sql_trace_data_t *data)
size_t M_sql_trace_get_bind_cols(const M_sql_trace_data_t *data)
M_uint64 M_sql_trace_get_duration_ms(const M_sql_trace_data_t *data)
size_t M_sql_trace_get_bind_rows_processed(const M_sql_trace_data_t *data)
size_t M_sql_trace_get_affected_rows(const M_sql_trace_data_t *data)
M_sql_error_t M_sql_trace_get_error(const M_sql_trace_data_t *data)
M_sql_conn_type_t M_sql_trace_get_conntype(const M_sql_trace_data_t *data)
size_t M_sql_trace_get_bind_rows_current(const M_sql_trace_data_t *data)
size_t M_sql_trace_get_bind_rows(const M_sql_trace_data_t *data)
char * M_sql_trace_get_query_formatted(const M_sql_trace_data_t *data)
@ M_SQL_CONN_TYPE_READONLY
Definition: m_sql_trace.h:86
@ M_SQL_CONN_TYPE_UNKNOWN
Definition: m_sql_trace.h:84
@ M_SQL_CONN_TYPE_PRIMARY
Definition: m_sql_trace.h:85
@ M_SQL_TRACE_BEGIN_START
Definition: m_sql_trace.h:53
@ M_SQL_TRACE_EXECUTE_FINISH
Definition: m_sql_trace.h:68
@ M_SQL_TRACE_STALL_TRANS_IDLE
Definition: m_sql_trace.h:77
@ M_SQL_TRACE_STALL_QUERY
Definition: m_sql_trace.h:76
@ M_SQL_TRACE_CONNFAIL
Definition: m_sql_trace.h:71
@ M_SQL_TRACE_DISCONNECTING
Definition: m_sql_trace.h:51
@ M_SQL_TRACE_FETCH_START
Definition: m_sql_trace.h:69
@ M_SQL_TRACE_FETCH_FINISH
Definition: m_sql_trace.h:70
@ M_SQL_TRACE_STALL_TRANS_LONG
Definition: m_sql_trace.h:78
@ M_SQL_TRACE_CONNECTED
Definition: m_sql_trace.h:49
@ M_SQL_TRACE_DISCONNECTED
Definition: m_sql_trace.h:52
@ M_SQL_TRACE_ROLLBACK_FINISH
Definition: m_sql_trace.h:60
@ M_SQL_TRACE_BEGIN_FINISH
Definition: m_sql_trace.h:56
@ M_SQL_TRACE_DRIVER_ERROR
Definition: m_sql_trace.h:75
@ M_SQL_TRACE_TRANFAIL
Definition: m_sql_trace.h:72
@ M_SQL_TRACE_EXECUTE_START
Definition: m_sql_trace.h:67
@ M_SQL_TRACE_COMMIT_FINISH
Definition: m_sql_trace.h:66
@ M_SQL_TRACE_ROLLBACK_START
Definition: m_sql_trace.h:57
@ M_SQL_TRACE_CONNECTING
Definition: m_sql_trace.h:48
@ M_SQL_TRACE_CONNECT_FAILED
Definition: m_sql_trace.h:50
@ M_SQL_TRACE_COMMIT_START
Definition: m_sql_trace.h:61
@ M_SQL_TRACE_DRIVER_DEBUG
Definition: m_sql_trace.h:74