Bug #67122 [Com]: PDO::ATTR_EMULATE_PREPARES = false drops microseconds from timestamp
Edit report at https://bugs.php.net/bug.php?id=67122&edit=1
ID: 67122
Comment by: info at strongholdmedia dot eu
Reported by: russellbarnhart at gmail dot com
Summary: PDO::ATTR_EMULATE_PREPARES = false drops
microseconds from timestamp
Status: Open
Type: Bug
Package: PDO MySQL
Operating System: Ubuntu 12.04 & 14.04
PHP Version: 5.5.11
Block user comment: N
Private report: N
New Comment:
Created a new, more appropriate bug here
https://bugs.php.net/bug.php?id=76386
and commented a lot there.
The solution proposed here does not work as it has been written for a fixed precision of 6, whilst
MySQL supports any precision between 0-6.
I also created a proper fix and sent a pull request that did not make any tests fail.
See here:
https://github.com/php/php-src/pull/3257
I am unsure when it will be merged and into which release though (even though it is 100% backwards
compatible).
Previous Comments:
------------------------------------------------------------------------
[2018-05-29 07:09:23] labs at strongholdmedia dot eu
Thanks for the follow up, it was very useful.
It is apparent that, regardless I did not get the error with mysqli, it is not a bug with PDO per se
but instead the prepared statement handler in mysqlnd.
(That shall mean it would have had happened with mysqli as well had I used prepared statements.)
I try and open a bug with them then.
(No wonder I did not find anything in the PDO sources. :P)
------------------------------------------------------------------------
[2018-05-16 01:28:54] ell at cybercog dot su
I've found possible solution: https://github.com/andrewmackrodt/php-pdo-fractional-bug/pull/1/commits/50552212b77b1b1021918ba98f45b1866b0fb057
------------------------------------------------------------------------
[2018-04-12 10:04:48] labs at strongholdmedia dot eu
This is indeed a problem with PDO; when using mysqli, the issue is not apparent.
------------------------------------------------------------------------
[2018-04-10 12:25:58] labs at strongholdmedia dot eu
Can anybody elaborate if this is really a problem with PDO itself, or, rather, is the cause the
underlying mysqlnd (that is still 5.0.12-dev from 2015)?
------------------------------------------------------------------------
[2017-06-16 06:42:49] webmaster at etherframegames dot com
Any updates on this? I can confirm that it still exists as of 7.1.5
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=67122
--
Edit this bug report at https://bugs.php.net/bug.php?id=67122&edit=1
Thread (8 messages)