Bug #95051 mysql lock table and autocommit issue
Submitted: 18 Apr 2019 11:01 Modified: 18 Apr 2019 11:24
Reporter: wu winnie Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version: OS:Windows
Assigned to: CPU Architecture:Any

[18 Apr 2019 11:01] wu winnie
Description:
I have two questions about MySQL usage, I am not sure if they are bugs:
I installed mysql5.7 by default options. then I connect to MySQL by MySQL query browser:
1) if I run "SET autocommit='OFF'", then I use "show variables like 'autocommit';" to check the value, but I still get the result: autocommit='ON'.
Only if I run "SET global autocommit='OFF';" then I can see the value has been changed, why?
2) with autocommit='ON' , I want to lock a table by:
lock tables xxx write
but I can still query this table from another session.
even if I login with another user account, I can still query this table
why?

How to repeat:
nothing
[18 Apr 2019 11:05] wu winnie
MySQL version: 5.7.25
[18 Apr 2019 11:24] wu winnie
according to my test, it was the client - MySQL query browser issue. so I think you can close it
[18 Apr 2019 11:24] wu winnie
close it