[Digikam-devel] [Bug 276920] Digikam shows wrong file size in thumbnail info for files >2Gb

Francesco Riosa francesco+kde at pnpitalia.it
Mon Jul 11 18:03:48 CEST 2011


Francesco Riosa <francesco+kde at pnpitalia.it> changed:

           What    |Removed                     |Added
                 CC|                            |francesco+kde at pnpitalia.it

--- Comment #4 from Francesco Riosa <francesco+kde pnpitalia it>  2011-07-11 16:03:47 ---
(In reply to comment #3)
> Quite simple: The filesize is stored in an integer, at some places even a
> signed integer.
> It is straightforward to change fields to qlonglong on the C++ side. Question
> is if the database is ready to store a longer value. With SQlite, the field is
> declared as INTEGER but that apparently also allows 64bit values.

sqlite is ok:
SELECT * FROM Tags WHERE id = 9223372036854775807;
delete from Tags where id = 9223372036854775807;

> Francesco, what about MySQL?

nope mysql has different types for 32 and 64 bit integer (and has a few more
for smaller ones), one of the things I want to do with next revision of the
database is to change many fields from type INT to BIGINT, if needed I can do
it for 2.0 but cannot suggest it.

mysql> INSERT INTO Tags
Query OK, 1 row affected, 2 warnings (0.02 sec)

mysql> show warnings 
    -> ;
| Level   | Code | Message                                      |
| Warning | 1264 | Out of range value for column 'id' at row 1  |
| Warning | 1264 | Out of range value for column 'pid' at row 1 |
2 rows in set (0.01 sec)

what does digikam use the size for? If it's only a display thing we can fix it
in c++ for sqlite users and correct mysql database for 2.1

Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the Digikam-devel mailing list