Suppose I have a table:
CREATE TABLE test ( ID INT AUTO_INCREMENT PRIMARY KEY, InsertTime DATETIME ) ENGINE = InnoDB;
And through the Apache / PHP website, in response to web requests, I continue to do this:
INSERT INTO test (InsertTime) values (NOW());
Can we assume that if row1.ID > row2.ID
, then row1.InsertTime >= row2.InsertTime
? Or, perhaps, through some unsuccessful combination of factors (a multiprocessor server in a replicated environment with the moons of Jupiter in the correct alignment, etc.), Can this fail?
Note. I do not have any problems. I am writing a new piece of software and am wondering if I can rely on sorting by ID
as well as sorting by date (only NOW()
will even be inserted in this column).
Vilx-
source share