Bug 427051 - The saving of a database to MySQL fails
Summary: The saving of a database to MySQL fails
Status: REPORTED
Alias: None
Product: kmymoney
Classification: Applications
Component: database (show other bugs)
Version: 5.1.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-27 23:09 UTC by Stanimir Boychev
Modified: 2020-09-28 04:27 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Snapshot from the created DB (102.14 KB, image/png)
2020-09-27 23:19 UTC, Stanimir Boychev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stanimir Boychev 2020-09-27 23:09:55 UTC
SUMMARY
The saving of a database to MySQL fails

STEPS TO REPRODUCE
1. Install KMyMoney on Windows. Add libmysql.dll to kmymoney/bin otherwise MySQL saving does not work
2. Try to save a database to SQL/MYSQL. Use "Save As...", select "SQL", select Database Type MySQL
3. specify the database name, host name, username and password
4. Click "OK"

OBSERVED RESULT

The DB is created, tables also are created, but then:

The following error message is shown:

Cannot save to current database: Error in function unsigned long __cdecl MyMoneyStorageSqlPrivate::highestNumberFromIdString(class QString,class QString,int) : starting commit unit
Driver = QMYSQL, Host = nas542, User = sboychev, Database = KMyMoney
Driver Error: 
Database Error No -1: 
Text: 
Error type 0
Executed: 
Query error No -1: Driver not loaded Driver not loaded
Error type 1 C:\_\9b0777e7\kmymoney\kmymoney\plugins\sql\mymoneystoragesql.cpp:359



EXPECTED RESULT
Saved DB in MySQL

SOFTWARE/OS VERSIONS
Windows: 10
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 5.71.0
Qt Version: 5.15.0

ADDITIONAL INFORMATION
Comment 1 Stanimir Boychev 2020-09-27 23:19:03 UTC
Created attachment 131974 [details]
Snapshot from the created DB

These are the tables that are created. Only kmmFileInfo has some data in it - one line with version=12 and fixLevel=5
Comment 2 Stanimir Boychev 2020-09-27 23:24:30 UTC
MySQL versions are

Server: 5.1.73
Client: 5.6.17 (libmysql.dll)
Comment 3 Stanimir Boychev 2020-09-27 23:34:55 UTC
(In reply to Stanimir Boychev from comment #2)
> MySQL versions are
> 
> Server: 5.1.73
> Client: 5.6.17 (libmysql.dll)

I've also tried with Client v5.1.73 - with the same result.
Comment 4 Eleazar 2020-09-28 00:47:52 UTC
This is not limited to windows. I reported this issue using Linux (Kubuntu + MySql).

https://bugs.kde.org/show_bug.cgi?id=398410
Comment 5 Stanimir Boychev 2020-09-28 04:27:15 UTC
(In reply to Eleazar from comment #4)
> This is not limited to windows. I reported this issue using Linux (Kubuntu +
> MySql).
> 
> https://bugs.kde.org/show_bug.cgi?id=398410

It seems different - I don't observe crash and dump. Just a normal exception is thrown, which results in an error message box. KMyMoney continues to work after it. Just nothing is saved to the DB.

Also I use the latest stable build for win x64 of KMyMoney 5.1. The other bug refers to version 5.0.