DATETIME(n) / TIMESTAMP(n) columns drop fractional seconds
Los mantenedores suelen responder en 6 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 52/100
Línea de trabajo
Start by tracing the write and comparison paths that cast DATETIME and TIMESTAMP values through SQLite's DATETIME(), then check how declared precision is represented. The report reproduces the issue with DATETIME(6) and provides a fractional-second equality query to use when investigating. Done means values retain the expected fractional seconds on read and comparisons against the inserted value match; the report leaves the implementation approach open.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Reproduction
CREATE TABLE d (id INT, ts DATETIME(6));
INSERT INTO d (id, ts) VALUES (1, '2026-06-22 07:16:00.123456');
SELECT ts FROM d;
-- '2026-06-22 07:16:00' (MySQL: '2026-06-22 07:16:00.123456')
SELECT COUNT(*) FROM d WHERE ts = '2026-06-22 07:16:00.123456';
-- 0 (MySQL: 1)
Reproduced on trunk (3.1.0) with PHP 8.3 and SQLite 3.45.1.
Values written to DATETIME/TIMESTAMP columns are cast through SQLite's DATETIME(), which has no fractional part, so the column's declared precision is ignored. A value read back loses its fraction, and an equality or IN comparison against the value as written matches nothing. For example, an outbox that deletes processed rows by (id, queued_at) never deletes them.
Relation to #508
#508 adds MySQL-compatible date/time parsing and formatting, including fractional seconds, in the same code paths. Would you prefer this fixed on top of #508 (honoring DATETIME_PRECISION when casting on write, with MySQL's rounding or TIME_TRUNCATE_FRACTIONAL), or separately? I'm happy to contribute a PR in whichever direction fits.
Found while running WooCommerce on WordPress Playground.
Use of AI
This report was prepared with Claude Code.
- Lenguaje dominante
- PHP
- Estrellas
- 362
- Forks
- 69
- Merge medio
- 6 d 1 min
- PR fusionados (30 d)
- 6
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de WordPress/sqlite-database-integration
-
MySQL-on-SQLite does not translate DATE arithmetic with INTERVAL HOURPosiblemente ocupada @samuelmbabhazi la tomó hace 22 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
WordPress/sqlite-database-integration#454 · 3 comentarios ·
Los mantenedores suelen responder en 6 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
WordPress/sqlite-database-integration#529 ·
Los mantenedores suelen responder en 6 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
WordPress/sqlite-database-integration#528 ·
Los mantenedores suelen responder en 6 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
WordPress/sqlite-database-integration#526 ·
Los mantenedores suelen responder en 6 días
-
Match MySQL mixed-type result and comparison semantics for IF(), CASE, and IFNULL()Posiblemente ocupada @JanJakes la tomó hace 6 días. Abierto
WordPress/sqlite-database-integration#519 · 1 asignado ·
Los mantenedores suelen responder en 6 días
Todos los issues de WordPress/sqlite-database-integration
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
WordPress/hosting-handbook#506 ·
Los mantenedores suelen responder en 2 días
-
Installing a plugin with composer_packages installs dev dependencies and breaks the autoloader (Error 500)Posiblemente ocupada @Boy132 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
nginx: static-file locations drop the security headers, and the dotfile deny is matched after themAbiertobug Low Security
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
backdrop-contrib/commerce#60 ·