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:
unknown
2012-11-04 13:49:59 +02:00
parent 887f096883
commit 3ad6a1775c
3 changed files with 194 additions and 141 deletions

View File

@@ -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
}
};