Bug 433057

Summary: Error 1050 when writing SQL-Database
Product: [Applications] kmymoney Reporter: Thomas_C <thomas.conzelmann>
Component: databaseAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: REPORTED ---    
Severity: major CC: thomas.conzelmann
Priority: NOR    
Version: 5.0.6   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Other   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Details Error Description and settings

Description Thomas_C 2021-02-17 09:11:12 UTC
Created attachment 135753 [details]
Details Error Description and settings

SUMMARY

When writing the Database into an SQL MariaDB DB, subject error occurs. 
The complete message is:
In die aktuelle Datenbank kann nicht geschrieben werden: Error in function void MyMoneyStorageSqlPrivate::createTable(const MyMoneyDbTable&, int) : creating table/index kmmAccounts
Driver = QODBC, Host = 192.168.2.39, User = _kmy_db_test, Database = _kmy_db_test
Driver Error: 
Database Error No -1: 
Text: 
Error type 0
Executed: 
Query error No 1050: [ma-3.1.11][10.3.21-MariaDB-log]Table 'kmmAccounts' already exists QODBC3: Unable to execute statement
Error type 2 /home/abuild/rpmbuild/BUILD/kmymoney-5.0.6/kmymoney/plugins/sql/mymoneystoragesql_p.h:2582

The database "_kmy_db_test" on the MariaDB server exists. I was able to create the tables with KMyMoney, which is an indication to me, that the connection to the database is successfully established (see Details in the Attachment) and the user "_kmy_db_test" has sufficient rights.

STEPS TO REPRODUCE
1. Menue File - Save as - Format = "SQL" - Databasetype ="Open Database Connectivity"


OBSERVED RESULT
Subject error message, no record is written into the database.
Writing the data into a SQLite Format is succfussful as well writing into XML.

EXPECTED RESULT
Data should be written into the MariaDB database.

SOFTWARE/OS VERSIONS
Windows: 10, 64bit
macOS:  na
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: KDE Frameworks 5.47.0
Qt Version: Qt 5.9.1 (kompiliert gegen 5.9.1)

ADDITIONAL INFORMATION
MariaDB is running on a remote Linux NAS (Synology DS).
Port 3307