Bug #87781 | Incorrect date time getting inserted on time stamp column | ||
---|---|---|---|
Submitted: | 16 Sep 2017 7:06 | Modified: | 5 Oct 2017 23:18 |
Reporter: | suraj chauhan | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server | Severity: | S1 (Critical) |
Version: | 5.6.21 | OS: | CentOS |
Assigned to: | MySQL Verification Team | CPU Architecture: | Any |
Tags: | `created_on` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' |
[16 Sep 2017 7:06]
suraj chauhan
[5 Oct 2017 23:18]
MySQL Verification Team
I cannot reproduce your report: mysql [localhost] {msandbox} (test) > select count(*) from transaction_refund; +----------+ | count(*) | +----------+ | 70254592 | +----------+ 1 row in set (18.86 sec) mysql [localhost] {msandbox} (test) > select min(id), max(id), min(modified_on), max(modified_on), min(created_on), max(created_on) from transaction_refund\G *************************** 1. row *************************** min(id): 1 max(id): 70778267 min(modified_on): 2017-10-05 21:52:45 max(modified_on): 2017-10-05 22:18:06 min(created_on): 0000-00-00 00:00:00 max(created_on): 0000-00-00 00:00:00 1 row in set (0.06 sec) mysql [localhost] {msandbox} (test) > delete from transaction_refund where id between 1000000 and 50000000; Query OK, 48713813 rows affected (2 hours 22 min 2.32 sec) mysql [localhost] {msandbox} (test) > Insert into `transaction_refund`(`id`,`transaction_id`,`amount`,`reference_id`,`status`,`merchant_id`,`transaction_type`,`modified_on`,`created_on`,`lockid`,`timeofrefund`,`admin_id`,`source`,`merchant_userId`,`od_hits`,`first_od_time`,`last_od_time`,`client_ip`) values(80000343,6379091858,1147,'PZT1708311818J4W0302',101,136530,'cancelRefund','2017-09-15 13:10:26','2017-09-15 13:10:26',NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,'180.179.116.70'); Query OK, 1 row affected (0.06 sec) mysql [localhost] {msandbox} (test) > select * from `transaction_refund` where id = 80000343\G *************************** 1. row *************************** id: 80000343 transaction_id: 6379091858 amount: 1147.00 reference_id: PZT1708311818J4W0302 status: 101 merchant_id: 136530 transaction_type: cancelRefund modified_on: 2017-09-15 13:10:26 created_on: 2017-09-15 13:10:26 lockid: NULL timeofrefund: NULL admin_id: NULL source: 1 merchant_userId: NULL od_hits: NULL first_od_time: NULL last_od_time: NULL client_ip: 180.179.116.70 1 row in set (0.02 sec) mysql [localhost] {msandbox} (test) > select @@version -> ; +-----------+ | @@version | +-----------+ | 5.6.37 | +-----------+ 1 row in set (0.00 sec) mysql [localhost] {msandbox} (test) > Insert into `transaction_refund`(`id`,`transaction_id`,`amount`,`reference_id`,`status`,`merchant_id`,`transaction_type`,`modified_on`,`created_on`,`lockid`,`timeofrefund`,`admin_id`,`source`,`merchant_userId`,`od_hits`,`first_od_time`,`last_od_time`,`client_ip`) values(1000343,6379091858,1147,'PZT1708311818J4W0302',101,136530,'cancelRefund','2017-09-15 13:10:26','2017-09-15 13:10:26',NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,'180.179.116.70'); Query OK, 1 row affected (0.00 sec) mysql [localhost] {msandbox} (test) > select * from `transaction_refund` where id = 1000343\G *************************** 1. row *************************** id: 1000343 transaction_id: 6379091858 amount: 1147.00 reference_id: PZT1708311818J4W0302 status: 101 merchant_id: 136530 transaction_type: cancelRefund modified_on: 2017-09-15 13:10:26 created_on: 2017-09-15 13:10:26 lockid: NULL timeofrefund: NULL admin_id: NULL source: 1 merchant_userId: NULL od_hits: NULL first_od_time: NULL last_od_time: NULL client_ip: 180.179.116.70 1 row in set (0.00 sec) mysql [localhost] {msandbox} (test) >
[5 Oct 2017 23:19]
MySQL Verification Team
so, as you can see 70M rows, 49M hole, inserted one after the dataset and one inside the hole and it behaves as expected best regards Bogdan