diff options
author | Michael Widenius <monty@mariadb.org> | 2014-03-11 17:49:09 +0200 |
---|---|---|
committer | Michael Widenius <monty@mariadb.org> | 2014-03-11 17:49:09 +0200 |
commit | 172784965981c7d06ddb50457f0178da25104b9e (patch) | |
tree | b0759d12a5abd3acf49ac11d4f601d46bc6c5e0a /sql/sql_audit.cc | |
parent | 23af77d26e3ff336e415a5d8bf3f4c4a7bc84a18 (diff) | |
parent | 800a278fd09c353a02f02c9c32074d3807861967 (diff) | |
download | mariadb-git-172784965981c7d06ddb50457f0178da25104b9e.tar.gz |
Merge with 5.5
Diffstat (limited to 'sql/sql_audit.cc')
-rw-r--r-- | sql/sql_audit.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_audit.cc b/sql/sql_audit.cc index a92f69f3da4..84f2d95c5da 100644 --- a/sql/sql_audit.cc +++ b/sql/sql_audit.cc @@ -84,7 +84,7 @@ static void general_class_handler(THD *thd, uint event_subtype, va_list ap) event.general_rows= (unsigned long long) va_arg(ap, ha_rows); event.database= va_arg(ap, const char *); event.database_length= va_arg(ap, unsigned int); - event.query_id= (unsigned long long) thd->query_id; + event.query_id= (unsigned long long) (thd ? thd->query_id : 0); event_class_dispatch(thd, MYSQL_AUDIT_GENERAL_CLASS, &event); } @@ -134,7 +134,7 @@ static void table_class_handler(THD *thd, uint event_subclass, va_list ap) event.new_database_length= va_arg(ap, unsigned int); event.new_table= va_arg(ap, const char *); event.new_table_length= va_arg(ap, unsigned int); - event.query_id= (unsigned long long) thd->query_id; + event.query_id= (unsigned long long) (thd ? thd->query_id : 0); event_class_dispatch(thd, MYSQL_AUDIT_TABLE_CLASS, &event); } |