Recently, I have been working for a subject storehouse system. Since duplicate subject are added to the storehouse, it is necessary to query the duplicate subject, and delete all duplicate subject leave only one, so that the duplicate subject cannot be taken when the test is taken. First wrote a small example: Single field operation […]
Category: mysql
Mysql deadlock, waiting for resources, transaction lock, lock wait timeout exceeded; try restarting transaction
Mysql deadlock, waiting for resources, transaction lock, lock wait timeout exceeded; try restarting transaction I have already learned about InnoDB. When the lock wait occurs, it will judge whether the timeout operation is needed according to the configuration of the parameter innodb_lock_wait_timeout. This document describes the viewing and analysis processing when the lock wait occurs. […]
Mybatis annotation application mapping statement
MyBatis provides a variety of annotation mappings such as SELECT, UPDATE, INSERT, and DELETE. Let me take a closer look at the application of these mappings. 1.@Insert We can use the @Insert annotation to declare an INSERT mapping. Package com.owen.mybatis.mappers; Public interface StudentMapper { @Insert(“INSERT INTO STUDENTS(STUD_ID, NAME, EMAIL, ADDR_ID, PHONE) VALUES(#{studId},#{name},#{email},#{address.addrId},#{phone})”) Int insertStudent(Student student); […]