-
However, if you use the INSERT IGNORE statement, the rows with invalid data that cause the error
are ignored
and the rows with valid data are inserted into the table. -
MySQL
truncated
data before inserting it into the tokens table
http://www.mysqltutorial.org/mysql-insert-ignore/
I would recommend using INSERT...ON DUPLICATE KEY UPDATE.
https://stackoverflow.com/questions/548541/insert-ignore-vs-insert-on-duplicate-key-update
- 和auto_increment相关的insert种类
- INSERT-like
- simple insert
- Bulk inserts
- Mixed-mode inserts
Q: Tx2的自增id有3种可能的情况,Tx2 > Tx1 // Tx2< Tx1 // minTx1<Tx2<Tx1max,是哪种?
Tx1: INSERT INTO t1 (c2) SELECT 1000 rows from another table ...
Tx2: INSERT INTO t1 (c2) VALUES ('xxx');