← Back to team overview

maria-developers team mailing list archive

Invalid code in server_audit.c

 

Hi Alexei,

While investigating community contributions from Daniel Black (MDEV-9433),
I came across this comment:

[image: danblack]Daniel Black
<https://mariadb.atlassian.net/secure/ViewProfile.jspa?name=danblack> added
a comment - 2016-01-20 02:54

[plugin/server_audit/server_audit.c:402]: (error) Invalid number of
character '{' when these macros are defined:
'DBUG_VOID_RETURN=return;DBUG_RETURN(a)=return a;HAVE_PSI_INTERFACE'.
[plugin/server_audit/server_audit.c:402]: (error) Invalid number of
character '{' when these macros are defined:
'DBUG_VOID_RETURN=return;DBUG_RETURN(a)=return
a;HAVE_PSI_INTERFACE;HUGETLB_USE_PROC_MEMINFO'.
[plugin/server_audit/server_audit.c:402]: (error) Invalid number of
character '{' when these macros are defined:
'DBUG_VOID_RETURN=return;DBUG_RETURN(a)=return
a;HAVE_PSI_INTERFACE;USE_ALARM_THREAD'.

Exists in 5.5
https://github.com/MariaDB/server/blob/5.5/plugin/server_audit/server_audit.c#L541

Remove second {{

I've had a look at the code mentioned there and key_LOCK_bigbuffer does not
exist anywhere else. Since we're not getting any compilation issues, it
means we're not compiling that bit of code due to the defines. This indeed
is so, as MYSQL_DYNAMIC_PLUGIN is defined for that file on the default
cmake config which leads to FLOGGER being defined.

I could not figure out a way to actually compile the code with defines such
that that bit of code actually compiles. Either way it would not compile,
due to the missing symbol. Do you think that we should just remove the line
that mentions key_LOCK_bigbuffer? Also, since this is something we have not
caught during testing, can we test for this compilation configuration
somehow?

Vicentiu