maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #08221
Re: MDEV-6089 review
Sergei,
On Tue, Mar 03, 2015 at 05:50:10PM +0100, Sergei Golubchik wrote:
...skip...
> > > in MDL_lock constructor, I'd set m_strategy to 0 (ori to 1 or, may
> > > be, keep it uninitialized) as a safety measure, to ensure it's not
> > > used before MDL_lock::lf_hash_initializer().
> > I guess it's for one of intermediate patches. Last version does it.
>
> MDL_lock has two constructors. One sets m_strategy to 0, the other to
> &m_scoped_lock_strategy.
Sorry, don't get the point. The one that sets m_strategy to 0 is used to
construct MDL_lock for lf-hash use. The other is used to construct MDL_lock
for those GLOBAL/COMMIT "singletons" and it has assertion:
...
DBUG_ASSERT(key_arg->mdl_namespace() == MDL_key::GLOBAL ||
key_arg->mdl_namespace() == MDL_key::COMMIT);
...
Thanks,
Sergey
References