Bug #19719 ndbapi: event notification attributes are NULL when compiling with NDEBUG flag
Submitted: 11 May 2006 10:44 Modified: 13 May 2006 15:20
Reporter: paul stanley Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S2 (Serious)
Version:5.0.21 OS:Linux (linux)
Assigned to: Jon Stephens CPU Architecture:Any

[11 May 2006 10:44] paul stanley
Description:
The ndbapi provides an event notification callback system, which allows clients to register and receive table change events. 

The problem is that the attributes are return as null when the api is compiled without debug. (i.e. with the NDEBUG flag.)

This has been caused by calling non-constant methods inside an insert the assert macro.

How to repeat:
1) Compile the ndbapi with out debug.
2) Compile and run event_example program. (ndb/ndbapi-example/ndb_event_example)
3) re-compile the ndbapi and the event example with debug. 
4) re-run the event example program and compare the output

Suggested fix:

Please remove the calls to receive_data from inside the assert macro.

File: ndb/src/ndbapi/NdbEventOperationImpl.cpp
Method Name: NdbEventOperationImpl::next(int *pOverrun)
line 430: assert(tAttr->receive_data(aDataPtr, tDataSz));
line 467: assert(tWorkingRecAttr->receive_data(aDataPtr, tDataSz));
line 502: assert(tWorkingRecAttr->receive_data(aDataPtr, tDataSz));
[12 May 2006 9:00] Tomas Ulin
Paul,

we are not supporting the "Event notification api" for cluster in 5.0.  This will be supported from 5.1.

If the documentation is not clear on this, it needs to be updated.

I'm sorry for any inconvenience.

BR,

Tomas
[13 May 2006 15:20] Jon Stephens
Thank you for your bug report. This issue has been addressed in the
documentation. The updated documentation will appear on our website
shortly, and will be included in the next release of the relevant
product(s).

Additional info:

This limitation has been noted in the new NDB API documentation, which is currently in preparation for release in Q3 '06.
[13 May 2006 15:47] Jon Stephens
Changed category/lead, added link to changeset of fix.