mysql select * into OUTFILE 不会锁表

mysql>  select * into  OUTFILE  'out.txt' from test.t3; 不会锁表:

mysql> show engine innodb statusG  
*************************** 1. row ***************************

------------
TRANSACTIONS
------------
Trx id counter 123413
Purge done for trx's n:o < 122897 undo n:o < 0 state: running but idle
History list length 461
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 123412, not started
MySQL thread id 62, OS thread handle 0x7fe5a1337700, query id 1261 localhost root init
show engine innodb status
---TRANSACTION 123410, ACTIVE 108 sec
MySQL thread id 60, OS thread handle 0x7fe5a12f6700, query id 1243 localhost root cleaning up
Trx read view will not see trx with id >= 123411, sees < 123409
--------


mysql> show engine innodb statusG  


LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 123412, not started
MySQL thread id 62, OS thread handle 0x7fe5a1337700, query id 1264 localhost root init
show engine innodb status

---TRANSACTION 123410, ACTIVE 160 sec fetching rows
mysql tables in use 1, locked 0
MySQL thread id 60, OS thread handle 0x7fe5a12f6700, query id 1263 localhost root Sending data
select * into  OUTFILE  'out.txt' from test.t3
Trx read view will not see trx with id >= 123411, sees < 123409
--------

============================

1 row in set (0.00 sec)

原文地址:https://www.cnblogs.com/hzcya1995/p/13351744.html