You've already forked mysql-audit
mirror of
https://github.com/trellix-enterprise/mysql-audit.git
synced 2025-12-14 18:14:01 +08:00
new vars: offsets_by_version and validate_offsets_extended. By default we try to resolve offsets by version. Also, added extended validation of the offsets.
This commit is contained in:
@@ -144,24 +144,6 @@ public:
|
||||
{
|
||||
return *(LEX**) (((unsigned char *) thd) + Audit_formatter::thd_offsets.lex);
|
||||
}
|
||||
//will return a pointer to the query and set len with the length of the query
|
||||
static inline const char * thd_query(THD * thd, size_t * len)
|
||||
{
|
||||
#if MYSQL_VERSION_ID >= 50505
|
||||
MYSQL_LEX_STRING * str = thd_query_string(thd);
|
||||
if(str)
|
||||
{
|
||||
*len = str->length;
|
||||
return str->str;
|
||||
}
|
||||
*len = 0;
|
||||
return NULL;
|
||||
|
||||
#else
|
||||
*len = thd->query_length();
|
||||
return thd->query();
|
||||
#endif
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user