DELETE clause deleting stuff it shouldn't: timestamp related
Posted: Sun Oct 16, 2005 7:59 pm
I am running these two queries:
The net result is that there are no rows in the table, which doesn't seem right, as I'm fairly certain 510256 > 499456 and thus doesn't fulfill the condition and isn't deleted...
The table looks like:
Code: Select all
INSERT INTO `twp_captchas` ( `id`, `value`, `creation` ) VALUES (15,'cliojabi',1129510256);
DELETE FROM `twp_captchas` WHERE creation < 1129499456;The table looks like:
Code: Select all
CREATE TABLE `twp_captchas` (
`id` int(11) NOT NULL default '0',
`value` varchar(8) collate utf8_unicode_ci NOT NULL default '',
`creation` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `value` (`value`,`creation`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;