Maximum Time Execution of revExecuteSQL different for Windows and Mac

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
ZoOoOoP
Posts: 10
Joined: Sun Feb 27, 2022 2:17 pm

Maximum Time Execution of revExecuteSQL different for Windows and Mac

Post by ZoOoOoP » Thu Nov 17, 2022 3:41 am

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...

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

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

Post by Klaus » Thu Nov 17, 2022 1:25 pm

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

ZoOoOoP
Posts: 10
Joined: Sun Feb 27, 2022 2:17 pm

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

Post by ZoOoOoP » Fri Nov 18, 2022 3:08 am

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?

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

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

Post by Klaus » Fri Nov 18, 2022 9:28 am

Yes, sounds like a bug.
Please consider to create a report here: https://quality.livecode.com

ZoOoOoP
Posts: 10
Joined: Sun Feb 27, 2022 2:17 pm

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

Post by ZoOoOoP » Fri Nov 18, 2022 12:48 pm

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)".

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

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

Post by Klaus » Fri Nov 18, 2022 1:01 pm

Thank you!

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

Post Reply

Return to “Databases”