错误处理
1.如果表空间满了,innodb会回滚整个事务
If you run out of file space in a tablespace, a MySQL Table is full error occurs and InnoDB rolls back the SQL statement.
2.死锁会导致innod回滚整个事务
A transaction deadlock causes InnoDB to roll back the entire transaction
3.锁等待超时会导致innodb只回滚超时的那条sql,如果想回滚整个事务,可以启用innodb-rollback-on-timeout参数,如果启用该参数,重试也会重试整个事务
A lock wait timeout causes InnoDB to roll back only the single statement that was waiting for the lock and encountered the timeout.
To have the entire transaction roll back, start the server with the --innodb-rollback-on-timeout option.
Retry the statement if using the current behavior, or the entire transaction if using --innodb-rollback-on-timeout.