[fpc-pascal] Cannot write datetime field on sqlite3 database on ARM

Michael Van Canneyt michael at freepascal.org
Tue Mar 9 10:08:59 CET 2021

On Tue, 9 Mar 2021, Toru Takubo via fpc-pascal wrote:

>> thank you for the test program. I tested on linux 64-bit, that works OK 
> too.
>> When you look in the database on the arm machineĀ  with an sqlite tool, do
>> you see the correct values or are the inserted values wrong ?
>> (I'm trying to establish whether the problem happens during readĀ  or write)
> Looking into the database with "DB Browser for SQLite", those fields are all 
> "0".
> If you set some value in those fields by the tool, you can read them with fpc 
> program.
> Therefore problem happens on writing values, I believe.

It certainly seems so, yes.

>>> I used a shared library libsqlite3.so included in the "DB Browser for 
> SQLite",
>>> so it should work. What can cause such a problem only in the specific 
> field
>>> on the specific platform?
>> Seems like either a floating point issue, or an alignment issue.
>> I know ARM has some specific behaviour with regard to alignment.
>> Unfortunately, I have no idea what to test or the means to test it.
>> Someone more familiar with ARM will need ro test.
> It would be better for me to create a bug report?

At this point I think this would indeed be necessary.

So, yes, please add a bugreport !


More information about the fpc-pascal mailing list