[Kmymoney-devel] [kmymoney4] [Bug 339103] reports cannot be created using the DB backend

Christian David christian-david at web.de
Sat Jan 31 21:15:52 UTC 2015


Christian David <christian-david at web.de> changed:

           What    |Removed                     |Added
   Version Fixed In|                            |4.8
         Resolution|---                         |FIXED
      Latest Commit|                            |http://commits.kde.org/kmym
                   |                            |oney/b36a26f9a2c2e683537e3e
                   |                            |678a54caadc61a7171
             Status|CONFIRMED                   |RESOLVED

--- Comment #11 from Christian David <christian-david at web.de> ---
Git commit 35c53b901b155e3a917e37e7d3e6124ec4dead1b by Christian Dávid, on
behalf of Daniel Ring.
Committed on 31/01/2015 at 13:21.
Pushed by christiand into branch 'master'.

Added function highestIdNumString() to extract new ids from SQL tables

This adds a function to retrieve the highest ID number from the
database. The IDs are prefixed by a short identifier string, and are
stored in the database as strings.
REVIEW: 122138

M  +13   -0    kmymoney/mymoney/storage/mymoneydatabasemgrtest.cpp
M  +1    -0    kmymoney/mymoney/storage/mymoneydatabasemgrtest.h
M  +26   -0    kmymoney/mymoney/storage/mymoneydbdriver.cpp
M  +5    -0    kmymoney/mymoney/storage/mymoneydbdriver.h
M  +12   -0    kmymoney/mymoney/storage/mymoneystoragesql.cpp
M  +9    -0    kmymoney/mymoney/storage/mymoneystoragesql.h


--- Comment #12 from Christian David <christian-david at web.de> ---
Git commit b36a26f9a2c2e683537e3e678a54caadc61a7171 by Christian Dávid.
Committed on 31/01/2015 at 20:43.
Pushed by christiand into branch 'master'.

Corrected calculation of the next MyMoneyObject ids in SQL backend

The next MyMoneyObjects' ids were stored in the table kmmFileInfo. But
this data got corrupted in the past several times.

Now the highest id is calculated - so corruptions should not be possible

The calculation process is lazy and is only executed when needed as it
is quite expensive (uses regex on some RDBMSs). Unfortunatly the SQL
backend triggers the calculation all the time at the moment - way more
often than needed. Some writeFileInfo() and readFileInfo() calls must
be removed to fix that (future work).

Any calls to writeFileInfo() and readFileInfo() are removed - these
methods cannot be called before the upgrade process is finished!

Also the higest id numbers are not set during the upgrade process.

M  +20   -20   kmymoney/mymoney/storage/mymoneydatabasemgr.cpp
M  +108  -234  kmymoney/mymoney/storage/mymoneystoragesql.cpp
M  +10   -6    kmymoney/mymoney/storage/mymoneystoragesql.h


You are receiving this mail because:
You are the assignee for the bug.

More information about the KMyMoney-devel mailing list