It seems lock released after we execute PREPARE is then taken again after we executed EXECUTE. So, real question remain:
Is there any way to release metadata lock:
mysql> select * from performance_schema.metadata_locks\G
*************************** 1. row *************************** OBJECT_TYPE: TABLE OBJECT_SCHEMA: test OBJECT_NAME: t
OBJECT_INSTANCE_BEGIN: 140044187351136 LOCK_TYPE: SHARED_READ LOCK_DURATION: TRANSACTION LOCK_STATUS: GRANTED SOURCE: sql_parse.cc:5585
OWNER_THREAD_ID: 24 OWNER_EVENT_ID: 16
(the above is the output from 5.7) as soon as we've determined list of columns (prepared the statement) and then do not set it again, even when autocommit=0?
It seems lock released after we execute PREPARE is then taken again after we executed EXECUTE. So, real question remain:
Is there any way to release metadata lock:
mysql> select * from performance_ schema. metadata_ locks\G ******* ******* ****** 1. row ******* ******* ******* ******
OBJECT_ TYPE: TABLE
OBJECT_ SCHEMA: test
OBJECT_ NAME: t INSTANCE_ BEGIN: 140044187351136
LOCK_ TYPE: SHARED_READ
LOCK_DURATION: TRANSACTION
LOCK_ STATUS: GRANTED
SOURCE: sql_parse.cc:5585 THREAD_ ID: 24
OWNER_EVENT_ ID: 16
*******
OBJECT_
OWNER_
(the above is the output from 5.7) as soon as we've determined list of columns (prepared the statement) and then do not set it again, even when autocommit=0?