Bug #67122 [Opn->Dup]: PDO::ATTR_EMULATE_PREPARES = false drops microseconds from timestamp

From: Date: Fri, 15 Jun 2018 05:34:49 +0000
Subject: Bug #67122 [Opn->Dup]: PDO::ATTR_EMULATE_PREPARES = false drops microseconds from timestamp
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-215730@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67122&edit=1 ID: 67122 Updated by: ab@php.net Reported by: russellbarnhart at gmail dot com Summary: PDO::ATTR_EMULATE_PREPARES = false drops microseconds from timestamp -Status: Open +Status: Duplicate 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: See bug #76386. Previous Comments: ------------------------------------------------------------------------ [2018-05-30 10:58:38] info at strongholdmedia dot eu 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). ------------------------------------------------------------------------ [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)? ------------------------------------------------------------------------ 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

« previous php.bugs (#215730) next »