Bug 277583

Summary: Upgrade mdbtools to current version
Product: [Applications] KEXI Reporter: Dimitrios T Tanis <dimitrios.tanis>
Component: Migration/Import/ExportAssignee: Jarosław Staniek <staniek>
Status: CLOSED FIXED    
Severity: crash CC: adam, rasasi78, sreedharpalayil, staniek
Priority: NOR Keywords: bounty
Version: 2.4 alpha2 (Calligra 2.4 alpha2)   
Target Milestone: 2.9.11   
Platform: Compiled Sources   
OS: Linux   
URL: https://github.com/staniek/kexi/issues/2
Latest Commit: Version Fixed In: 2.9.11
Sentry Crash Report:
Bug Depends on:    
Bug Blocks: 336560    

Description Dimitrios T Tanis 2011-07-11 20:54:23 UTC
Version:           2.4 alpha2 (Calligra 2.4 alpha2) (using KDE 4.6.0) 
OS:                Linux

Current mdbtools sources included with Kexi are long outdated. Importing an mdb on a 64bit machine, crashes Kexi.
Mdbtools sources should not be in Kexi, so that they can be updated seperately. Mdbtools project is back on the run, and the user should be able to use the installed libraries.

Reproducible: Always

Steps to Reproduce:
Try to open an mdb file from Kexi.

Actual Results:  
Kexi crashes at the final wizard page, either trying to import structure and data or structure only.

Expected Results:  
Using available mdbtools, Kexi not crashing

Besides the fact this crashes Kexi, it is critical because for the time being it is the only way to import data from an Access file.
Trying to get people to move to Kexi from Access at some point, means the should be able to move their existing data/design also.
Comment 1 Adam Pigg 2011-07-11 21:04:41 UTC
Perhaps also some of the kexi patches (fixing warning etc) can go upstream
Comment 2 Jarosław Staniek 2011-07-14 20:57:28 UTC
Thanks for raising this up. I understand the need but we need to have our fixes put upstream before we can even think about using the vanilla mdbtools. Even with our patches it is unstable (maybe also because of usage of C language with glib and lack of updated unit tests).
Comment 3 Adam Pigg 2011-07-14 21:03:13 UTC
Can we perhaps adapt to just using the upstream version?  I tried it with northwind2003 locally (64bit) and it seemed to read the tables fine, where kexi has always crashed on my machine doing the same thing
Comment 4 Jarosław Staniek 2011-07-14 21:13:13 UTC
Good! Did not know the upstream version is so different. Then we'll need to look at our patches and also on what's new in mdbtools.
Comment 5 Adam Pigg 2011-07-14 21:16:16 UTC
Yes, there has been a lot of activity this year https://github.com/brianb/mdbtools/commits/master
Comment 6 Adam Pigg 2011-08-04 20:46:57 UTC
Can you attach a crashing mdb database?  Ive just ported mdbmigrate to the system mdbtools, but i dont have a database that crashes with the old version to test it against, northwind2003 appears to work with both.
Comment 7 Jarosław Staniek 2012-05-06 22:41:09 UTC
Alternative idea: 

Use [http://jackcess.sourceforge.net] jackcess instead of mdbtools. That would add java dependency but only for the driver. They beat mdbtools [http://jackcess.sourceforge.net/faq.html#mdbtools]. And are 5 times faster than original MSA. They really support many details [http://jackcess.svn.sourceforge.net/viewvc/jackcess/jackcess/trunk/src/java/com/healthmarketscience/jackcess/query/QueryFormat.java?revision=623&view=markup]

Later someone would port it back to C++...
Comment 8 Jarosław Staniek 2014-06-26 11:47:46 UTC
Changed summary
Comment 9 Jarosław Staniek 2015-08-26 06:46:02 UTC
Founding possible at https://github.com/staniek/kexi/issues/2 (click Post a bounty on it)
Comment 10 Jarosław Staniek 2016-01-23 00:14:57 UTC
Northwind database imports properly imports, e.g. from
http://www.2013.net/courses/access/
Comment 11 Jarosław Staniek 2016-01-26 01:22:35 UTC
Git commit 001a0ecd0fbe352f59d25e69aa3dcedc91f133d4 by Jaroslaw Staniek.
Committed on 26/01/2016 at 01:17.
Pushed by staniek into branch 'calligra/2.9'.

Kexi MDB Import: Update to mdbtools from June 2014

Summary:
Related: bug 336560

This also fixes primary keys import

FIXED-IN:2.9.11

Test Plan: Northwind database imports properly with keys, try e.g. from http://www.2013.net/courses/access/

Reviewers: piggz, wicik

Subscribers: Kexi-Devel-list

Projects: #kexi

Differential Revision: https://phabricator.kde.org/D855

M  +89   -35   kexi/migration/mdb/3rdparty/mdbtools/include/mdbtools.h
M  +52   -17   kexi/migration/mdb/3rdparty/mdbtools/libmdb/catalog.c
M  +200  -130  kexi/migration/mdb/3rdparty/mdbtools/libmdb/data.c
M  +19   -1    kexi/migration/mdb/3rdparty/mdbtools/libmdb/dump.c
M  +132  -12   kexi/migration/mdb/3rdparty/mdbtools/libmdb/file.c
M  +42   -22   kexi/migration/mdb/3rdparty/mdbtools/libmdb/iconv.c
M  +123  -79   kexi/migration/mdb/3rdparty/mdbtools/libmdb/index.c
M  +3    -4    kexi/migration/mdb/3rdparty/mdbtools/libmdb/like.c
M  +13   -8    kexi/migration/mdb/3rdparty/mdbtools/libmdb/map.c
M  +9    -34   kexi/migration/mdb/3rdparty/mdbtools/libmdb/mem.c
M  +53   -24   kexi/migration/mdb/3rdparty/mdbtools/libmdb/money.c
M  +22   -22   kexi/migration/mdb/3rdparty/mdbtools/libmdb/options.c
A  +215  -0    kexi/migration/mdb/3rdparty/mdbtools/libmdb/props.c     [License: LGPL (v2+)]
M  +53   -8    kexi/migration/mdb/3rdparty/mdbtools/libmdb/sargs.c
A  +77   -0    kexi/migration/mdb/3rdparty/mdbtools/libmdb/stats.c     [License: LGPL (v2+)]
M  +86   -39   kexi/migration/mdb/3rdparty/mdbtools/libmdb/table.c
M  +3    -3    kexi/migration/mdb/3rdparty/mdbtools/libmdb/worktable.c
M  +114  -79   kexi/migration/mdb/3rdparty/mdbtools/libmdb/write.c
D  +0    -7    kexi/migration/mdb/3rdparty/mdbtools/update_diffs.sh
M  +4    -0    kexi/migration/mdb/ChangeLog
M  +5    -1    kexi/migration/mdb/src/CMakeLists.txt
M  +4    -20   kexi/migration/mdb/src/keximdb/mdbmigrate.cpp
M  +1    -4    kexi/migration/mdb/src/keximdb/mdbmigrate.h

http://commits.kde.org/calligra/001a0ecd0fbe352f59d25e69aa3dcedc91f133d4
Comment 12 Jarosław Staniek 2016-01-26 01:25:42 UTC
Finally, the fix has been donated by me!
Comment 13 Jarosław Staniek 2016-02-29 23:34:09 UTC
Git commit 5a2ab83ab935d3710ea9daa924427e75a833f247 by Jaroslaw Staniek.
Committed on 29/02/2016 at 23:07.
Pushed by staniek into branch 'master'.

MDB Import: Update to mdbtools from June 2014
Related: bug 336560

This also fixes primary keys import

FIXED-IN:2.9.11

Test Plan: Northwind database imports properly with keys, try e.g. from http://www.2013.net/courses/access/

Differential Revision: https://phabricator.kde.org/D855

(from calligra.git)

M  +92   -38   src/migration/mdb/3rdparty/mdbtools/include/mdbtools.h
M  +53   -18   src/migration/mdb/3rdparty/mdbtools/libmdb/catalog.c
M  +201  -131  src/migration/mdb/3rdparty/mdbtools/libmdb/data.c
M  +19   -1    src/migration/mdb/3rdparty/mdbtools/libmdb/dump.c
M  +132  -12   src/migration/mdb/3rdparty/mdbtools/libmdb/file.c
M  +41   -21   src/migration/mdb/3rdparty/mdbtools/libmdb/iconv.c
M  +122  -78   src/migration/mdb/3rdparty/mdbtools/libmdb/index.c
M  +3    -4    src/migration/mdb/3rdparty/mdbtools/libmdb/like.c
M  +13   -8    src/migration/mdb/3rdparty/mdbtools/libmdb/map.c
M  +9    -34   src/migration/mdb/3rdparty/mdbtools/libmdb/mem.c
M  +53   -24   src/migration/mdb/3rdparty/mdbtools/libmdb/money.c
M  +22   -22   src/migration/mdb/3rdparty/mdbtools/libmdb/options.c
A  +215  -0    src/migration/mdb/3rdparty/mdbtools/libmdb/props.c     [License: LGPL (v2+)]
M  +53   -8    src/migration/mdb/3rdparty/mdbtools/libmdb/sargs.c
A  +77   -0    src/migration/mdb/3rdparty/mdbtools/libmdb/stats.c     [License: LGPL (v2+)]
M  +86   -39   src/migration/mdb/3rdparty/mdbtools/libmdb/table.c
M  +3    -3    src/migration/mdb/3rdparty/mdbtools/libmdb/worktable.c
M  +113  -78   src/migration/mdb/3rdparty/mdbtools/libmdb/write.c
D  +0    -7    src/migration/mdb/3rdparty/mdbtools/update_diffs.sh
M  +4    -0    src/migration/mdb/ChangeLog
M  +6    -1    src/migration/mdb/src/CMakeLists.txt
M  +6    -21   src/migration/mdb/src/keximdb/mdbmigrate.cpp
M  +1    -4    src/migration/mdb/src/keximdb/mdbmigrate.h

http://commits.kde.org/kexi/5a2ab83ab935d3710ea9daa924427e75a833f247