You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
已知 A transaction ID is only needed for a transaction that might perform write operations or locking reads such as SELECT ... FOR UPDATE.
START TRANSACTION; SELECT * FROM table -- trx_id 283911508463232 SELECT * FROM table for share -- 283911508463232 SELECT * FROM table for update -- 93004 -- 查询当前会话是否存在活跃事务 SELECT * FROM information_schema.innodb_trx WHERE trx_mysql_thread_id = CONNECTION_ID();
加了for share 跟普通select trx_id一样,如果说不分配事务id,那上面的mysql原文怎么理解,locking reads包括for share和 FOR UPDATE啊
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
已知
A transaction ID is only needed for a transaction that might perform write operations or locking reads such as SELECT ... FOR UPDATE.
加了for share 跟普通select trx_id一样,如果说不分配事务id,那上面的mysql原文怎么理解,locking reads包括for share和 FOR UPDATE啊
Beta Was this translation helpful? Give feedback.
All reactions