Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
None
-
4.8.4
-
None
-
Qt 4.8.4 / win7 x64 / 32-bit / msvc10
-
7216387370203fc8f49d76cc2cb68bb5286c8dff
Description
MySQL supports sub-second precision (actually microsecond) for DATETIME, TIMESTAMP and TIME types since version 5.6.4 (see http://dev.mysql.com/doc/refman/5.6/en/fractional-seconds.html), together with a recent MySQL C connector.
However there is a bug in qsql_mysql.cpp where there is a confusion between milli and microseconds when storing a datetime into database:
myTime->second_part = time.msec();
should become:
myTime->second_part = time.msec()*1000;
This patch works fine on my machine (tested only with DATETIME fields).
Attachments
Issue Links
- is duplicated by
-
QTBUG-46589 Qt mysql driver binds miliseconds improperly
- Closed
For Gerrit Dashboard: QTBUG-31124 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
72551,2 | Fix sub-second handling in MySQL driver | stable | qt/qtbase | Status: MERGED | +2 | 0 |