The fix for BUG 21136 (ChangeSet@1.2611.1.1) introduced a regression that caused a few tests to fail because the thd->extra_lock wasn't being set to NULL after the table was unlocked. This poses a serious problem because later attempts to access thd->extra_lock (now a dangling pointer) will probably result in a crash (undefined behavior) -- and that's what actually happens in some test cases.
The fix for BUG 21136 (ChangeSet@1.2611.1.1) introduced a regression that
caused a few tests to fail because the thd->extra_lock wasn't being set to
NULL after the table was unlocked. This poses a serious problem because later
attempts to access thd->extra_lock (now a dangling pointer) will probably
result in a crash (undefined behavior) -- and that's what actually happens
in some test cases.

The solution is to set the select_create::m_plock pointee to NULL, which
means that thd->extra_lock is set to NULL when the lock data is not for a
temporary table.

natsys/mariadb_10.2,natsys/mariadb_10.2,davidl-zend/zenddbi,flynn1973/mariadb-aix,davidl-zend/zenddbi,natsys/mariadb_10.2,natsys/mariadb_10.2,flynn1973/mariadb-aix,flynn1973/mariadb-aix,flynn1973/mariadb-aix,flynn1973/mariadb-aix,ollie314/server,davidl-zend/zenddbi,davidl-zend/zenddbi,ollie314/server,natsys/mariadb_10.2,ollie314/server,natsys/mariadb_10.2,ollie314/server,flynn1973/mariadb-aix,ollie314/server,slanterns/server,davidl-zend/zenddbi,flynn1973/mariadb-aix,davidl-zend/zenddbi,natsys/mariadb_10.2,davidl-zend/zenddbi,natsys/mariadb_10.2,ollie314/server,natsys/mariadb_10.2,davidl-zend/zenddbi,ollie314/server,davidl-zend/zenddbi,natsys/mariadb_10.2,flynn1973/mariadb-aix,ollie314/server,flynn1973/mariadb-aix,ollie314/server,davidl-zend/zenddbi,ollie314/server,davidl-zend/zenddbi,natsys/mariadb_10.2,flynn1973/mariadb-aix,flynn1973/mariadb-aix,ollie314/server