← Back to team overview

maria-developers team mailing list archive

We Are Allowed To Add No More Than Two New Log Events :)


Hi Monty,

I found out why MySQL/Sun generously allowed to add new
log events starting only from number 196. 

How many log events with numbers >= 196 can be added?
Only TWO !!!

Indeed, each event must have post header length <= 254 because
this length must be saved in the uchar post_header_len[] array
(the value 255 is reserved as the "undefined" length value).

Now, the post header of the Format description event has
the length = number_of_events + 57. Hence max number of
possible events in MySQL is 254 - 57 = 197.

Funny :)


Follow ups