Search found 753 matches

by aehimself
11.11.2019, 12:14
Forum: ZeosLib 7.2 Forum
Topic: ZConnection - force a complete reload of database libraries
Replies: 54
Views: 2724

Re: ZConnection - force a complete reload of database libraries

As a side note, I couldn't manage to make git-svn work so I had to use SmartGit. It has UI somewhat differing from Tortoise and I still find it inconvenient for everyday work. So my workflow is: - sync Zeos SVN repo into local Git repo with SmartGit - make changes in local repo and commit them with...
by aehimself
10.11.2019, 18:40
Forum: ZeosLib 7.2 Forum
Topic: ZConnection - force a complete reload of database libraries
Replies: 54
Views: 2724

Re: ZConnection - force a complete reload of database libraries

I added your latest files. I hope, these contain all relevant changes? Could you please check that? Yes, they all seem to be properly imported to testing-7.3. Even the .ToString is now IntToStr so we should be D7-compatible again :) Edit: The modification of src/dbc/ZDbcIntfs.pas was missed in both...
by aehimself
09.11.2019, 21:20
Forum: ZeosLib 7.2 Forum
Topic: ZConnection - force a complete reload of database libraries
Replies: 54
Views: 2724

Re: ZConnection - force a complete reload of database libraries

So I found the necessary API calls and implemented the .AbortOperation method for SQLite and PostgreSQL as well. However, as I have no such databases available I could not test if they actually work so I left a warning in the source about them. I also corrected the .ToString to IntToStr in the MySQL...
by aehimself
09.11.2019, 11:04
Forum: ZeosLib 7.2 Forum
Topic: ZConnection - force a complete reload of database libraries
Replies: 54
Views: 2724

Re: ZConnection - force a complete reload of database libraries

I just checked your changes in to Zeos 7.3. You can see it if you update your git repository from our SVN. Sounds good, thanks! Just keep in mind that I forgot to change the String helper and @Fr0st said that it's a no-go this way. See http://zeoslib.sourceforge.net/viewtopic.php?p=136000#p136000 ....
by aehimself
08.11.2019, 14:45
Forum: ZeosLib 7.2 Forum
Topic: ZConnection - force a complete reload of database libraries
Replies: 54
Views: 2724

Re: ZConnection - force a complete reload of database libraries

...just replace ZDbcMySql.pas line 663 from

Code: Select all

 killquery := 'KILL QUERY ' + FPlainDriver.mysql_thread_id(FHandle).ToString;
to

Code: Select all

 killquery := 'KILL QUERY ' + IntToStr(FPlainDriver.mysql_thread_id(FHandle));
:)
by aehimself
08.11.2019, 12:07
Forum: ZeosLib 7.2 Forum
Topic: ZConnection - force a complete reload of database libraries
Replies: 54
Views: 2724

Re: ZConnection - force a complete reload of database libraries

For DBLib (Tested on MSSQL with FreeTDS): AbortOperation-DBLib-code-0-r6100-branches-testing-7.3.7z Most peaceful abortion ever! No exceptions raised, simply stops downloading records. [12:06:00.667] Connection established, client version: 0.0.0, server version: 0.0.0, component version: 7.3.0-alpha...
by aehimself
08.11.2019, 11:04
Forum: ZeosLib 7.2 Forum
Topic: ZConnection - force a complete reload of database libraries
Replies: 54
Views: 2724

Re: ZConnection - force a complete reload of database libraries

Oracle version seems to be working fine during the .Open and .FetchAll methods too: [09:54:35.445] Connection established, client version: 19.3.0, server version: 11.2.0, component version: 7.3.0-alpha [09:54:35.680] Abort request was sent [09:54:35.774] EZSQLException was raised while running the q...
by aehimself
07.11.2019, 23:37
Forum: ZeosLib 7.2 Forum
Topic: ZConnection - force a complete reload of database libraries
Replies: 54
Views: 2724

Re: ZConnection - force a complete reload of database libraries

Oracle seems to be a little better and a little worse from this perspective. The library is parallel, so simply calling Result := (Self.GetIZPlainDriver As TZOraclePlainDriver).OCIBreak(FHandle, err) = 0; yields the desired results. The bad thing? It only cancels connect operations. For queries it n...
by aehimself
07.11.2019, 20:14
Forum: ZeosLib 7.2 Forum
Topic: ZConnection - force a complete reload of database libraries
Replies: 54
Views: 2724

Re: ZConnection - force a complete reload of database libraries

GOT IT TO WORK!!!! Looks like this: Function TZMySQLConnection.AbortOperation: Boolean; Var killquery: String; izc: IZConnection; Begin If Closed Or (FHandle = Nil) Then Result := False Else Begin killquery := 'KILL QUERY ' + FPlainDriver.mysql_thread_id(FHandle).ToString; izc := DriverManager.GetCo...
by aehimself
07.11.2019, 18:24
Forum: ZeosLib 7.2 Forum
Topic: ZConnection - force a complete reload of database libraries
Replies: 54
Views: 2724

Re: ZConnection - force a complete reload of database libraries

Getting closer. When using the advised (duh...) .GetInstance, I get the following result: [18:16:51.245] Connection established, client version: 6.1.11, server version: 8.0.13, component version: 7.3.0-alpha [18:17:26.838] Abort request was sent [18:17:28.687] EAccessViolation was raised while runni...
by aehimself
07.11.2019, 14:44
Forum: ZeosLib 7.2 Forum
Topic: ZConnection - force a complete reload of database libraries
Replies: 54
Views: 2724

Re: ZConnection - force a complete reload of database libraries

Soooooooooooooooooooo..... it WORKS! By not sticking to mysql_kill, it even runs fine with libmysql.dll: [14:36:20.462] Connection established, client version: 6.1.11, server version: 8.0.13, component version: 7.3.0-alpha [14:36:21.322] MySQL thread ID: 25946 [14:36:21.525] Cancellation query is se...
by aehimself
07.11.2019, 13:18
Forum: ZeosLib 7.2 Forum
Topic: ZConnection - force a complete reload of database libraries
Replies: 54
Views: 2724

Re: ZConnection - force a complete reload of database libraries

I know, it was only a test :) And - surprise, surprise - changing using libmariadb.dll instead of libmysql.dll does the job nicely (God, I can not express how much I started to dislike Oracle products!) . No more access violations, and returns an error "Thead with PID 0 not found" or somet...
by aehimself
06.11.2019, 15:45
Forum: ZeosLib 7.2 Forum
Topic: ZConnection - force a complete reload of database libraries
Replies: 54
Views: 2724

Re: ZConnection - force a complete reload of database libraries

No luck until now. After upgrading to 7.3, I exported the property of TZMySQLConnection in ZDbcMySql.pas: Property Handle: PMYSQL Read FHandle; Then, I uncommented the mysql_kill functions in ZPlainMySqlDriver.pas. Test code looks like this: Var a: TZMySQLPlainDriver; begin a := ZConnection1.DbcConn...
by aehimself
06.11.2019, 13:40
Forum: ZeosLib 7.2 Forum
Topic: ZConnection - force a complete reload of database libraries
Replies: 54
Views: 2724

Re: ZConnection - force a complete reload of database libraries

I think this should be a general method implemented for all drivers just like PingServer. This was exactly my thought. I started to check the implementation of PingServer to get an idea on how to proceed :) There's GetInstance method to retrieve an object from an interface. You can check its usage ...
by aehimself
06.11.2019, 09:47
Forum: ZeosLib 7.2 Forum
Topic: ZConnection - force a complete reload of database libraries
Replies: 54
Views: 2724

Re: ZConnection - force a complete reload of database libraries

So the good thing is that database systems already seem to support this: Oracle has OCIBreak(), MySQL has mysql_kill and DBLib (FreeTDS?) has dbcancel. As https://vrogier.github.io/ocilib/doc/html/group___ocilib_c_api_abort.html mentions: Any call to OCI_Break() has to be done from a separate thread...