Konstantin Osipov wrote:
> * Davi Arnaut <davi@stripped> [07/09/28 23:24]:
>> ChangeSet@stripped, 2007-09-28 16:22:46-03:00, davi@stripped +3 -0
>> Bug#21136 CREATE TABLE SELECT within CREATE TABLE SELECT causes server crash
>
> OK to push.
>
> Please see one item below.
>
>> + if (create_info->options & HA_LEX_CREATE_TMP_TABLE)
>> + m_plock= &m_lock, m_lock= extra_lock;
>
> Please do two separate assignments on separate lines, as per the
> coding style.
>
>> + else
>> + m_plock= &thd->extra_lock, thd->extra_lock= extra_lock;
>
> Same here.
>
> If you want to save space you can do:
>
> if (create_info->options & HA_LEX_CREATE_TMP_TABLE)
> m_plock= &m_lock;
> else
> m_ploc= &thd->extra_lock;
>
> *m_plock= extra_lock;
>
D'oh! Thanks.
--
Davi Arnaut, Software Engineer
MySQL Inc, www.mysql.com
Are you MySQL certified? www.mysql.com/certification