|
From: Christoph H. <c.h...@gm...> - 2011-01-27 13:06:32
|
Hello !
I'm using GnuCash with a MySql backend using libdbi. There are some
strange errors with some versions of libdbi for which a workaround has been built
which says one should change the version of libdbi. This error message has just
been included and it stops me from using my financial data. Because of that
i tried to find the error. At the moment it seems to me that it is linked to
dbi_conn_queryf.
The test in Gnucash calls it with
result = dbi_conn_queryf( conn,
"INSERT INTO numtest VALUES (%lld, %llu, %17e)",
testlonglong, testulonglong, testdouble );
where
gint64 testlonglong = -9223372036854775807LL, resultlonglong = 0;
guint64 testulonglong = 9223372036854775807LLU, resultulonglong = 0;
gdouble testdouble = 1.7976921348623157E+307, resultdouble = 0.0;
This fails at my system. The logfile of MySql states
110127 13:40:28 21 Connect christoph@localhost on gnucash
21 Query CREATE TEMPORARY TABLE numtest ( test_int BIGINT, test_unsigned BIGINT, test_double FLOAT8 )
21 Query INSERT INTO numtest VALUES (-9223372036854775807, 9223372036854775807, 1,797692e+307)
The last row is wrong because it is 1,797692e+307 instead of 1.797692e+307. The separator is wrong. I guess this is because
the locale for germany where i live puts it that way.
I don't know if this is a feature or a bug. But i guess it would make life simpler if printf in that function wouldn't be so locale specific ;-)
I'm not a C programmer and I'm not sure if the solution should be a change of libdbi or GnuCash.
regards,
Christoph Holtermann
|