Error code: 1100 Table 't_ depart_info 'was not locked with lock tables, tableoftables

Source: Internet
Author: User

Error code: 1100 Table 't_ depart_info 'was not locked with lock tables, tableoftables

Analyze the cause of error code generation step by step. Be patient.

Step 1: Error description

1 queries executed, 0 success, 1 errors, 0 warnings query: insert into emp values (11, 'h', 23, 'female ') error code: 1100 Table 't_ depart_info 'was not locked with lock tables execution time: 0 sec Transfer Time: 0 sec total time consumed: 0 sec

Step 2: Cause of error

LOCK the emp database table read: lock table emp READ;

Insert data into emp and call the 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(7,'hai','hugang');  END; $$  DELIMITER ; 

Step 3: solution (very simple)

Release lockUnlock tables;

In fact, when encountering error code, we should follow the above three steps to solve the problem, and be good at discovering and solving the problem.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.