[yunqa.de] Problem with DISQLITE Hot backup

  • From: Edwin Yip <edwin.yip@xxxxxxxxxxxxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Thu, 30 Dec 2010 23:52:41 +0800

Hi Ralf,

I'm having a problem with the new "hot copy" function introduced in one of
the recent versions. This problem exists in the most recent DISQLite3 2.4.1
– 27 Dec 2010 version.

Steps to reproduce the problem in a Delphi program:

   1. Use a TDiSqlite3Database object (named cnn1) to open database
   'file1.db' in a normal way, keep cnn1 open ;
   2. execute 'hot backup' against 'file1.db', i.e. open it readonly,
   execute sqlite3_backup_init, etc, then close it.
   3. now call cnn1.Prepare a TDISQLite3Statement, call Step to execute some
   SQL's;
   4. finally, free that TDISQLite3Statement object, and a "Access
   violation" will happen.


the problem can be fixed if I close cnn1 before step 2, and reopen it after
the 'hot backup' operation. but you must have a better solution?

Thanks, and happy new year!

Stack trace generated by JCL DEBUG FYI:
Access violation at address 76F9FC47 in module 'ntdll.dll'. Write of address
00000014.

Exception class: EAccessViolation
Exception message: Access violation at address 76F9FC47 in module
'ntdll.dll'. Write of address 00000014.
Exception address: 76F9FC47
------------------------------------------------------------------------------
Stack list, generated 2010/12/30 23:50:10
[76F9FC47] Unknown function at iswdigit
[036713FB] DISQLite3Api...
[0365925D] DISQLite3Api...
[03659128] DISQLite3Api.sqlite3_mutex_enter
[0365CA42] DISQLite3Api...
[0365CB78] DISQLite3Api.@sqlite3ConnectionUnlocked
[03644BA1] DISQLite3Api.sqlite3VtabCommit
[0365B686] DISQLite3Api.@sqlite3VdbeSetColName
[0366FF7A] DISQLite3Api.sqlite3_free
[0366FFDB] DISQLite3Api.@sqlite3DbFree
[0365ADD8] DISQLite3Api.@sqlite3VdbeUsesBtree
[0365BD00] DISQLite3Api.sqlite3VdbeHalt
[0365BD1C] DISQLite3Api.@sqlite3VdbeReset
[0365BDF5] DISQLite3Api.@sqlite3VdbeFinalize
[03659304] DISQLite3Api.sqlite3_finalize
[03679EB0] DISQLite3Database.TDISQLite3Statement.Destroy (Line 2606,
"DISQLite3Database.pas" + 6)
[03464064] System.TObject.Free



-- 
Best Regards,
Edwin Yip

Mind Mapping is as Effortless as Typing
http://www.InnovationGear.com

Other related posts: