Author |
Message |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
[11.1.105 Pro] - SQL Editor crash |
|
There's something fishy happening in SQL Editor when connected to a MariaDB server and transactions are involved.
I've got a stored procedure that starts a transaction and depending on some settings and passed parameters, it either leaves it open or commits. Now, if I try to commit or rollback in the editor tab where I've called that stored procedure, SQL Editor tends to crash. Sometimes I don't even get to try to rollback, it crashes while running the stored procedure. The editor window simply closes without any warning, and that's all, unsaved changes made to files are lost. SQL Editor doesn't even prompt to restore tabs when I restart it.
|
|
Wed Dec 04, 2019 12:09 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Could you please try a different connection method/driver? Is the result reproducible?
Also, in the connection settings in v11.1 there is a new option for a server code pages (a.k.a. text encoding) which may have an impact on the returned results and diagnostic messages. Does changing that option make a difference?
|
|
Thu Dec 05, 2019 12:55 am |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
 |
 |
Could you please try a different connection method/driver? Is the result reproducible?
|
I could try, but even if different connection method would work, it wouldn't be a solution for me. I'm currently using ADO to connect because that's the only one that returns all the result sets when calling a stored procedure. Both ODBC and native only return the first result set and that's not something I can work with.
 |
 |
Also, in the connection settings in v11.1 there is a new option for a server code pages (a.k.a. text encoding) which may have an impact on the returned results and diagnostic messages. Does changing that option make a difference? |
The code page was set to Default. I've changed it to UTF8 but that didn't change anything. I only made three consecutive call + rollback call pairs before SE dropped dead. Do you think something in the result set might cause SE to crash? Each run was supposed to return the same result sets and the first two runs did not crash.
|
|
Thu Dec 05, 2019 4:27 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
We need to identify the root cause or find a way to reproduce that issue. If it's specific to the implementation of specific driver interface, internally the operations with ADO, ODBC and mariadblib native driver are quite different. Basically we need to figure out if it's driver specific, which may point to an issue with the driver or with the interface for that type of driver. If it's reproducible with both ADO and native lmariadblib, then we look in a different place. So far we can assume it appears unrelated to the new code page feature.
Also, is it reproducible with all procedures?
FYI, I tried executing procedures on my test MariaDB server and I was able to execute a couple of them without issues. I tried both ADO and mariadblib connections.
|
|
Thu Dec 05, 2019 9:29 am |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
It doesn't seem to happen when using native connection, I can reliably reproduce it on ADO (MySql.Data.MySqlClient (.Net 4)) and ODBC (both Driver={MariaDB ODBC 3.1 Driver} and Driver={MySQL ODBC 8.0 Unicode Driver}).
I call for stored procedures, none of which are starting explicit transactions or rolling back any. They do insert into tables, create temporary tables and call other stored procedures that do the same things but not even those mess with transactions.
I omit calling the fifth one that does mess with transactions.
After that four returns, I execute ROLLBACK, even though I know there are no active transactions. So far, so good. Executing ROLLBACK again will make SE go down, without any blaze or glory.
|
|
Fri Dec 06, 2019 5:59 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Could you please confirm that calling ROLLBACK twice within a stored procedure causes the editor to crash? Does the second rollback generate an error message?
|
|
Fri Dec 06, 2019 9:40 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
I created something very simple with two ROLLBACK in it, and it works fine
 |
 |
CREATE PROCEDURE `test`.`sp_with_error` ()
READS SQL DATA
proc: BEGIN
ROLLBACK;
ROLLBACK;
END |
|
|
Fri Dec 06, 2019 9:45 am |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
Simply executing ROLLBACKs doesn't do anything. I have to execute stored procedures prior to ROLLBACK. I've tried executing them one by one and nothing bad happens. But if I execute at least three of those stored procedures at once, then after the first ROLLBACK, no matter what I do, whether I ROLLBACK or try to call another stored procedure or just select from a view or table, the crash is imminent.
Check this short video here. There at the end I select four procedure calls and execute them and it crashes after executing something beyond the first ROLLBACK. I've made some tests and the first three suffice to burn and raze SE.
|
|
Sat Dec 07, 2019 4:52 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
May I ask you for a favor? Could you please execute the same code using 32-bit version of SQL Editor and ADO? This should confirm if the issue is in the driver or in handling of the procedure results..
|
|
Sat Dec 07, 2019 10:22 am |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
Yes, it happens on 32-bit version with ADO as well. And it's not necessarily procedure result. It crashes on ROLLBACK too.
|
|
Sun Dec 08, 2019 6:15 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Just wanted you let you know, this issue hasn't been forgotten, we are still working on it.
|
|
Tue Dec 10, 2019 10:36 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
May I ask you to check the application log file in %APPDATA%\SQL Assistant \11.0\SQLAssist.log and search from the end for "exception"
Because it crashes while processing the code,I don't think it gets a chance to handle the exception and save it stack trace, but it's still worth checking it.
|
|
Tue Dec 10, 2019 11:35 am |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
I did. There were a few exceptions in the log but none of them were related to the crash (nowhere near the time when the crash happened). They were mentioning losing connection to the server and I've seen those exception as a window popup message. They didn't result in a crash. I've cleared the log and checked it after a crash to be sure, but nothing unusual is in there. The word exception isn't anywhere in the file.
|
|
Wed Dec 11, 2019 3:21 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Thank you for checking
|
|
Wed Dec 11, 2019 7:39 pm |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
Is there any way I can help you analyze/solve this one? It is getting increasingly obstructive.
|
|
Fri Dec 13, 2019 9:02 am |
|
 |
|