Bug #104841 Run SQL Script results in locked temp file problejm
Submitted: 6 Sep 2021 12:16 Modified: 6 Sep 2021 13:07
Reporter: John King Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:8.0.23, 8.0.26 OS:Windows (Microsoft Windows 10 Pro)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[6 Sep 2021 12:16] John King
Description:
----[For better reports, please attach the log file after submitting. You can find it in C:\Users\Johannes\AppData\Roaming\MySQL\Workbench\log\wb.log]
Attempts to run an SQL Script using the File menu results in a WinError 32 complaing about a locked file.

How to repeat:
Select File / Run SQL Script...
select a file 
Click run

See video : http://youtu.be/WigmOmOqJJw?hd=1
[6 Sep 2021 12:17] John King
wb.log

Attachment: wb.log (application/octet-stream, text), 30.31 KiB.

[6 Sep 2021 13:07] MySQL Verification Team
Hello John,

Thank you for the report and feedback.
Verified as described with WB 8.0.26 on Windows 10.

regards,
Umesh
[15 Sep 2021 7:18] MySQL Verification Team
Bug #104947 marked as duplicate of this one
[14 Feb 2022 14:47] Cameron Davidson
Still present in workbench version  8.0.28.

This affects both my systems, Win 10 Pro x64 (desktop with 21H2 and laptop with 21H1).

Script in file can be as simple as "SELECT 1+2;" 

Sourcing the script in Mysql shell on the same system has no problem.
Loading into the sql window works as well, but that is no solution, as the normal reason for using the File->run script route is that preloading into the window is bad for big files.

The temp file is always created, but is zero bytes in size.

Lockhunter shows MySQL Workbench is the only program with the file locked.

Can be reliably replicated with connections to local mysqld (Community v 8.0.27 and 8.0.28) and even a remote mariaDB v10.3.

Problem occurs when the TMP folder is on another drive but also when TMP is in default location.
[21 Aug 2022 19:09] Marcin Kunert
Still present in workbench 8.0.30
[23 Oct 2022 13:51] Gurragchaa Sanjjamts
Still showing error MySQL version 8.0.31

Attachment: error 1.JPG (image/jpeg, text), 61.06 KiB.