maria-developers team mailing list archive
Mailing list archive
Re: Plugin init()/deinit() call convention
On Dec 26, Sergey Vojtovich wrote:
> Hi Sergei,
> IIRC during early days of plugins framework there was a strict convention when
> plugin deinit() function must be called. Specifically only after successful
> call to init() function.
> I'm now fixing a bug in related code (5.5) and noticed that:
> - deinit() may (or may not) be called without prior call to init()
> - deinit() may (or may not) be called with prior failed call to init()
> Do you think the above is correct?
No, "may (or may not)" should never be correct.
I'd say that deinit() should *not* be called without prior call to
What do in when init() fails is not obvious. I'm fine to say that we
only call deinit() after successful init().
Feel free to fix that. But please check the bzr history to see why the
old behavior was changed - was it an intentional change (I doubt it) ?