Thursday, July 23, 2026

.::: How to Simulation Locking with 'Waiting for table metadata lock' MariaDB MySQL :::.

 

correlation https://teguhth.blogspot.com/2026/07/how-to-simulation-blockinglock-locking.html

1. terminal 1 (user admin)

USE teguhth;

START TRANSACTION;
select connection_id() as session_id, user() as user;
SELECT * FROM pembelian WHERE KODE_PEMBELIAN='BEL-E001';

atau 
 
START TRANSACTION;
select connection_id() as session_id, user() as user;
UPDATE pembelian SET JUMLAH_PEMBELIAN=10 WHERE KODE_PEMBELIAN='BEL-E001';
 


2. terminal 2 (user aisyah)


select connection_id() as session_id, user() as user;
ALTER TABLE pembelian ADD COLUMN KETERANGAN VARCHAR(100);
 

3. check proceslist 
 

 


 

No comments:

Post a Comment

Popular Posts