How to solve the error code 1100 Table & # 039; was not locked with LOCK TABLES
This article is mainly about "how to solve the error code 1100 Table't error departmentalization info' was not locked with LOCK TABLES", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to solve the error code 1100 Table'terror departmentinfo' was not locked with LOCK TABLES!
The first step, error description
1 queries executed, 0 success, 1 errors, 0 warnings query: insert into emp values. Error code: 1100 Table'ttransmission departmentinfo' was not locked with LOCK TABLES: 0 sec transfer time: 0 sec total time: 0 sec
Step two, the cause of the error.
Lock the emp database table READ: LOCK TABLE emp READ
Inserting data into emp and calling trigger insert_data
DELIMITER $$USE `test` $$DROP TRIGGER / *! 50032 IF EXISTS * / `insert_ data` $$CREATE / *! 50017 DEFINER = 'root'@'localhost' * / TRIGGER `insert_ data`BEFORE INSERT ON `emp` FOR EACH ROW BEGIN INSERT INTO t_depart_info (id,depart_name,depart_teacher) VALUES
The third step, the solution (very simple)
Release lock UNLOCK TABLES
At this point, I believe you have a deeper understanding of "how to solve the error code 1100 Table'tcodes departmentalized info' was not locked with LOCK TABLES". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!