Description:
mysql> SELECT CAST(999999999 AS TIME); -- NULL + Warning 1292 (correct failure)
+--------------------------+
| CAST(999999999 AS TIME) |
+--------------------------+
| NULL |
+--------------------------+
1 row in set, 1 warning (0.00 sec)
mysql> SELECT CAST(9999999999 AS TIME); -- NULL + Warning 1292
+--------------------------+
| CAST(9999999999 AS TIME) |
+--------------------------+
| NULL |
+--------------------------+
1 row in set, 1 warning (0.00 sec)
mysql> SELECT CAST(10000000000 AS TIME); -- 00:00:00 ← silently zeroed, NO warning
+---------------------------+
| CAST(10000000000 AS TIME) |
+---------------------------+
| 00:00:00 |
+---------------------------+
1 row in set (0.00 sec)
mysql> SELECT CAST(100000000000 AS TIME); -- 00:00:00 ← silently zeroed, NO warning
+----------------------------+
| CAST(100000000000 AS TIME) |
+----------------------------+
| 00:00:00 |
+----------------------------+
1 row in set (0.00 sec)
mysql> SELECT CAST(99999999999999 AS TIME); -- NULL + Warning 1292
+------------------------------+
| CAST(99999999999999 AS TIME) |
+------------------------------+
| NULL |
+------------------------------+
1 row in set, 1 warning (0.00 sec)
mysql> SELECT CAST(-10000000000 AS TIME); -- NULL + Warning 1292 (negatives unaffected)
+----------------------------+
| CAST(-10000000000 AS TIME) |
+----------------------------+
| NULL |
+----------------------------+
1 row in set, 1 warning (0.00 sec)
Silent window: exactly positive integers in [10^10, 10^12]; outside the window, consistently NULL + warning.
DML split (same number, different behavior per path):
CREATE TABLE ti (c TIME);
INSERT INTO ti VALUES (9999999999); -- ERROR 1292 Incorrect time value (rejected — correct)
INSERT INTO ti VALUES (10000000000); -- silently stores 00:00:00, NO warning
the number→TIME intermediate representation takes a different branch inside the 11–12 digit window (suspected: double/decimal stringified intermediate partially parsed by str_to_time), producing an "effective 0" instead of a failure.
How to repeat:
SELECT CAST(999999999 AS TIME); -- NULL + Warning 1292 (correct failure)
SELECT CAST(9999999999 AS TIME); -- NULL + Warning 1292
SELECT CAST(10000000000 AS TIME); -- 00:00:00 ← silently zeroed, NO warning
SELECT CAST(100000000000 AS TIME); -- 00:00:00 ← silently zeroed, NO warning
SELECT CAST(99999999999999 AS TIME); -- NULL + Warning 1292
SELECT CAST(-10000000000 AS TIME); -- NULL + Warning 1292 (negatives unaffected)