How do these results make sense? I don't understand.
Shouldn't for example the last query return an empty set since that there are no threads with date > 2010? Why does it return a result from 2003?
mysql> SELECT *
FROM thread
WHERE newsgroup_id = '64654'
AND 'thread_date' < '2010-09-10 21:43:05'
LIMIT 1;
Empty set (0.00 sec)
mysql> SELECT *
FROM thread
WHERE newsgroup_id = '64654'
AND 'thread_date' < '2000-09-10 21:43:05'
LIMIT 1;
Empty set (0.00 sec)
mysql> SELECT *
FROM thread
WHERE newsgroup_id = '64654'
AND 'thread_date' > '2000-09-10 21:43:05'
LIMIT 1;
+--------------+-----------+-----------+----------+---------------------+---------------------+---------------------------------+-------------------------+
| newsgroup_id | thread_id | postcount | hash | thread_date | thread_date_last | thread_title | title_has_valid_charset |
+--------------+-----------+-----------+----------+---------------------+---------------------+---------------------------------+-------------------------+
| 64654 | 1 | 0 | O2gvcPRl | 2003-06-06 22:51:24 | 0000-00-00 00:00:00 | Vendo fotodigit 2.1 megapixel | 0 |
+--------------+-----------+-----------+----------+---------------------+---------------------+---------------------------------+-------------------------+
1 row in set (0.00 sec)
mysql> SELECT *
FROM thread
WHERE newsgroup_id = '64654'
AND 'thread_date' > '2010-09-10 21:43:05'
LIMIT 1;
+--------------+-----------+-----------+----------+---------------------+---------------------+---------------------------------+-------------------------+
| newsgroup_id | thread_id | postcount | hash | thread_date | thread_date_last | thread_title | title_has_valid_charset |
+--------------+-----------+-----------+----------+---------------------+---------------------+---------------------------------+-------------------------+
| 64654 | 1 | 0 | O2gvcPRl | 2003-06-06 22:51:24 | 0000-00-00 00:00:00 | Vendo fotodigit 2.1 megapixel | 0 |
+--------------+-----------+-----------+----------+---------------------+---------------------+---------------------------------+-------------------------+
1 row in set (0.00 sec)
<,>)