[MDEV-30368] Locking behaviour is missing in documentation Created: 2023-01-09  Updated: 2023-12-13

Status: Open
Project: MariaDB Server
Component/s: Data Definition - Create Table, Data Manipulation - Insert, Documentation, Server, Storage Engine - InnoDB
Fix Version/s: None

Type: Task Priority: Major
Reporter: Oli Sennhauser Assignee: Ian Gilfillan
Resolution: Unresolved Votes: 0
Labels: documentation

Issue Links:
PartOf
Relates
relates to MDEV-24813 Locking full table scan fails to use ... Confirmed

 Description   

Studying various sources point to the fact that:
INSERT INTO ... SELECT ... and
CREATE TABLE ... AS SELECT
causes lockings on (InnoDB) tables...

https://dba.stackexchange.com/questions/300543/mysql-mariadb-can-a-select-query-block-an-insert-query
https://www.percona.com/blog/2006/07/12/insert-into-select-performance-with-innodb-tables/
http://harrison-fisk.blogspot.com/2009/02/my-favorite-new-feature-of-mysql-51.html
https://mysql.wisborg.dk/2021/07/31/locking-select-with-create-table-insert-into-and-user-variables/
https://dev.mysql.com/doc/refman/8.0/en/innodb-locks-set.html

it would be good IMHO if this is somehow indicated on the following pages:

https://mariadb.com/kb/en/insert-select/
https://mariadb.com/kb/en/create-table/



 Comments   
Comment by Marko Mäkelä [ 2023-01-09 ]

To my understanding, there is no way to tell the SELECT part to suppress any locking. Copying a large table in this way could cause InnoDB to run out of the buffer pool until MDEV-24813 has been fixed.

Generated at Thu Feb 08 10:15:43 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.