Page 1 of 1

Maximum Time Execution of revExecuteSQL different for Windows and Mac

Posted: Thu Nov 17, 2022 3:41 am
by ZoOoOoP
Hello, the "revExecuteSQL" (REVDB_Execute) function seem to have a different maximum timeout on Windows and Mac...

For example when I execute a complexe MySQL "UPDATE" who take some time to execute, I noticed that I get the result "Lost connection to MySQL server during query" after :
- 2000ms (2 seconds) in Windows.
- 6000ms (6 seconds) in Mac.

It's not related to database configuration, but I think it's related to the database library including REVDB functions...

There is a way to change theses maximum timeout ? (Specially for Windows...)

The "revQueryDatabase" / "revDataFromQuery" functions don't have this problem...

Re: Maximum Time Execution of revExecuteSQL different for Windows and Mac

Posted: Thu Nov 17, 2022 1:25 pm
by Klaus
Hi ZoOoOoP,

please check the dictionary for -> revOpenDatabase
There is a parameter named -> rwTimeout
Maybe that is what you need? At least it sounds like...

Best

Klaus

Re: Maximum Time Execution of revExecuteSQL different for Windows and Mac

Posted: Fri Nov 18, 2022 3:08 am
by ZoOoOoP
Yes thank you it's related to this parameter, for windows the parameter is respected, but in Mac, the time it's every time exactly 3 times more, it's a bug ?

I see I was already put this parameter to "2" when I tried to found why different timeout on each platform, it's why I get theses timeouts :
- 2000ms (2 seconds) in Windows.
- 6000ms (6 seconds) in Mac.

If I put "10", I get :
- 10000ms (10 seconds) in Windows.
- 30000ms (30 seconds) in Mac.

So for now if I need the same time for each platform (for example if I want 9 seconds), this is the trick I do :

Code: Select all

...
if the platform is "Win32" then
put revOpenDatabase("MySQL", tDatabaseAddress, tDatabaseName, tDatabaseUser, tDatabasePassword,false,,9,true) into tResult
else if the platform is "MacOS" then
put revOpenDatabase("MySQL", tDatabaseAddress, tDatabaseName, tDatabaseUser, tDatabasePassword,false,,3,true) into tResult
...
But it intrigues me why it's 3 times more on Mac?

Re: Maximum Time Execution of revExecuteSQL different for Windows and Mac

Posted: Fri Nov 18, 2022 9:28 am
by Klaus
Yes, sounds like a bug.
Please consider to create a report here: https://quality.livecode.com

Re: Maximum Time Execution of revExecuteSQL different for Windows and Mac

Posted: Fri Nov 18, 2022 12:48 pm
by ZoOoOoP
OK I create the report -> https://quality.livecode.com/show_bug.cgi?id=24016
May be the bug was not present on "x86-64 (64 bit)" version, because I can only test on "ARM (M1)".

Re: Maximum Time Execution of revExecuteSQL different for Windows and Mac

Posted: Fri Nov 18, 2022 1:01 pm
by Klaus
Thank you!

OK, LC will tell us what may be wrong. :-)