Description:
Hello,
We experienced a very strange behavior a few days ago.
We have the following table:
CREATE TABLE `boxes` (
`ID` INTEGER(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`BoxN` VARCHAR(20) COLLATE utf8_general_ci DEFAULT NULL,
`Length` INTEGER(11) DEFAULT '0',
`Width` INTEGER(11) DEFAULT '0',
`Height` INTEGER(11) DEFAULT '0',
`ShipmentType` VARCHAR(20) COLLATE utf8_general_ci DEFAULT NULL,
`CustomerID` INTEGER(11) DEFAULT '0',
`PackPrice` INTEGER(11) DEFAULT '0',
`Weight` DOUBLE DEFAULT '0',
`TS` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`InternalBoxN` INTEGER(11) DEFAULT '0',
`STModified` BIT(1) DEFAULT 0,
`BoxTypeID` INTEGER(11) DEFAULT '0',
`MaterialID` INTEGER(11) DEFAULT '0',
`TSCreated` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`ID`),
KEY `InternalBoxN` (`InternalBoxN`)
)ENGINE=InnoDB
AUTO_INCREMENT=23145 CHARACTER SET 'utf8' COLLATE 'utf8_general_ci'
COMMENT='InnoDB free: 347136 kB';
Take a look at TSCreated column.
And we have the only query that changes TSCreated column:
"INSERT INTO boxes SET ..., TSCreated = NOW(), ... "
It was written a couple of years ago and always worked fine. But a few days ago several rows in the table got "zero" timestamp ('0000-00-00 00:00:00') in TSCreated column. The rows with zero timestamp were all added in the same day. We fixed them manually and the problem didn't repeat anymore.
Do you have any ideas why it could happen?
How to repeat:
Don't know.
Description: Hello, We experienced a very strange behavior a few days ago. We have the following table: CREATE TABLE `boxes` ( `ID` INTEGER(11) UNSIGNED NOT NULL AUTO_INCREMENT, `BoxN` VARCHAR(20) COLLATE utf8_general_ci DEFAULT NULL, `Length` INTEGER(11) DEFAULT '0', `Width` INTEGER(11) DEFAULT '0', `Height` INTEGER(11) DEFAULT '0', `ShipmentType` VARCHAR(20) COLLATE utf8_general_ci DEFAULT NULL, `CustomerID` INTEGER(11) DEFAULT '0', `PackPrice` INTEGER(11) DEFAULT '0', `Weight` DOUBLE DEFAULT '0', `TS` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `InternalBoxN` INTEGER(11) DEFAULT '0', `STModified` BIT(1) DEFAULT 0, `BoxTypeID` INTEGER(11) DEFAULT '0', `MaterialID` INTEGER(11) DEFAULT '0', `TSCreated` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`ID`), KEY `InternalBoxN` (`InternalBoxN`) )ENGINE=InnoDB AUTO_INCREMENT=23145 CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' COMMENT='InnoDB free: 347136 kB'; Take a look at TSCreated column. And we have the only query that changes TSCreated column: "INSERT INTO boxes SET ..., TSCreated = NOW(), ... " It was written a couple of years ago and always worked fine. But a few days ago several rows in the table got "zero" timestamp ('0000-00-00 00:00:00') in TSCreated column. The rows with zero timestamp were all added in the same day. We fixed them manually and the problem didn't repeat anymore. Do you have any ideas why it could happen? How to repeat: Don't know.