New diagnostic logging controlled by new environment variable
NDB_PATCH both for kernel and ndbapi applications.
Also added memory barriers in transporter layer that could possible
fix bug.
To enable the complete patch in run-time start process with
NDB_PATCH=-1
If bug can be reproduced, send logs for analysis.
If bug can not be reproduced, retry but turn of new memory barriers
For logging and read memory barriers use: NDB_PATCH=3
For logging and write memory barriers use: NDB_PATCH=5
For logging without new memory barriers use: NDB_PATCH=1
With this patch one can also add extra destinations for logs.
For syslog add ';syslog' to NDB_PATCH.
Example, export NDB_PATCH='-1;syslog'
For file add ';file=/path/to/process-specific.file' to NDB_PATCH.
Example, export NDB_PATCH='-1;file=/data/mysqld.1.patchlog'