Summary: | 4.8.0 creates invalid mysql statements on windows | ||
---|---|---|---|
Product: | [Applications] kmymoney | Reporter: | Gary <gfkde> |
Component: | database | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ralf.habacker |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Microsoft Windows | ||
OS: | Microsoft Windows | ||
Latest Commit: | https://commits.kde.org/kmymoney/64fa0cd4b58790324eaab18674e82de28e5cafaa | Version Fixed In: | 4.8.1,5.0.0 |
Description
Gary
2017-04-11 21:20:41 UTC
Here is the exact SQL in my 2), error is in 4th from last field: INSERT INTO kmmFileInfo (version, created, lastModified, baseCurrency, institutions, accounts, payees, tags, transactions, splits, securities, prices, currencies, schedules, reports, kvps, dateRangeStart, dateRangeEnd, hiInstitutionId, hiPayeeId, hiTagId, hiAccountId, hiTransactionId, hiScheduleId, hiSecurityId, hiReportId, encryptData, updateInProgress, budgets, hiBudgetId, hiOnlineJobId, hiPayeeIdentifierId, logonUser, logonAt, fixLevel) VALUES (8, '2017-04-11', '2017-04-11', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'N', NULL, NULL, NULL, NULLentifierId, NULL, NULL, 4); (In reply to Gary from comment #1) > Here is the exact SQL in my 2), error is in 4th from last field: The problem here is that the implementation of creating the statements creates a template first similar to the constructed line below: INSERT INTO kmmFileInfo (hiPayeeId, hiPayeeIdentifierId) VALUES (:hiPayeeId, :hiPayeeIdentifierId); and then replace the variable name :hiPayeeId' with 'NULL' which results into INSERT INTO kmmFileInfo (hiPayeeId, hiPayeeIdentifierId) VALUES (NULL, NULLIdentifierId); and let the remain replace of ':hiPayeeIdentifierId' unfinished. Git commit f0caa56bd8af0d7939b64f63294c2a60ca7b4e8b by Ralf Habacker. Committed on 29/06/2017 at 18:47. Pushed by habacker into branch '4.8'. Fix '4.8.0 creates invalid mysql statements on windows'. The performed replace was too simple. FIXED-IN:4.8.1 M +3 -0 kmymoney/mymoney/storage/mymoneydbdef.cpp https://commits.kde.org/kmymoney/f0caa56bd8af0d7939b64f63294c2a60ca7b4e8b Git commit 64fa0cd4b58790324eaab18674e82de28e5cafaa by Ralf Habacker. Committed on 01/07/2017 at 13:38. Pushed by habacker into branch '4.8'. Fix SQL DDL generation Query parameters are being matched only based on their name. If one parameter starts with the name of another, this leads to conflicts, e.g. :payeeId and :payeeIdentifier --> if both matches are replaced by NULL, this results in the second match being replaced to NULLentifier, which is obviously not intended. This commit superseeds commit f0caa56bd8af0d7939b64f63294c2a60ca7b4e8b. (cherry-picked from commit b4061d79fd6d205dcd1f85ec5528c1027f7fe1ad) REVIEW: 129796 FIXED-IN:4.8.1 # Conflicts: # kmymoney/mymoney/storage/mymoneydbdef.cpp M +4 -4 kmymoney/mymoney/storage/mymoneydbdef.cpp https://commits.kde.org/kmymoney/64fa0cd4b58790324eaab18674e82de28e5cafaa |