Bug #53308 Add capability to have Event Subscription wo/ listening to DDL
Submitted: 30 Apr 2010 9:53 Modified: 31 May 2010 15:12
Reporter: Geert Vanderkelen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S4 (Feature request)
Version:mysql-5.1-telco-6.3 OS:Any
Assigned to: Jonas Oreland CPU Architecture:Any

[30 Apr 2010 9:53] Geert Vanderkelen
Description:
Add capability to have Event Subscription wo/ listening to DDL.

How to repeat:
.

Suggested fix:
Proposed solutions by Jonas:

1) Change current event API, so that user does not get "ALTER TABLE" in the event stream
wo/ explicitly asking for it.
 => As a property on the actual event (createEvent())

2) Make this change so that changing/recompiling application is not necessary
(i.e actually change so that this new "option" is default)
 => As a property on the event operation (op = createEventOperation(); op->execute())

3) However, mysqld would still need to use the ""ALTER TABLE" in the event stream-feature
 => Possibly as a configuration variable
[3 May 2010 10:58] Jonas Oreland
DOCS:
This patch *changes default behavior* when using event-api.
Previously, when creating an NdbDictionary::Event, the default was that
  it would be set up so that DDL (alter/drop) was reported on an event-operation
  using the event.
This behavior has changed so that myEvent.setReport(NdbDictionary::Event::ER_DDL)
  needs to be used to get this behavior.

I.e recompile needed to get old behavior.
If just switching libndbnclient.so, new behavior is used.
[27 May 2010 8:53] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/109322

3205 Jonas Oreland	2010-05-27
      ndb - bug#53308 - change so that user explicitly needs to enable propagation of DDL-events in ndbapi
[27 May 2010 13:09] Jonas Oreland
pushed to 6.3.34, 7.0.14, 7.1.4
[31 May 2010 15:12] Jon Stephens
Documented change in the NDB 6.3.34, 7.0.15, and 7.1.4 changelogs, as follows:

      The default behavior of the NDB API Event API has changed as follows:
      
      Previously, when creating an NdbDictionary::Event, DDL operations 
      (alter and drop operations on tables) were automatically reported 
      on any event operation that used this event, but as a result of 
      this change, this is no longer the case. Instead, you must now 
      invoke the event's setReport() method, with the new EventReport 
      value ER_DDL, in order to get this behavior.
      
      For existing NDB API applications where you wish to retain the 
      old behavior, you must update the code as indicated previously, 
      then recompile, following an upgrade. Otherwise, DDL operations 
      are no longer reported after upgrading libndbnclient.

      For more information, see "Event::setReport()" and 
      "Event::EventReport" in the MySQL Cluster API Guide.

Closed.