Skip to content

MySQL 8 strict mode (NO_ZERO_DATE): zero-datetime value/default rejected #248

Description

@JJJ

Surfaced by the both-engine CI matrix (#230). Known: #220 finding #3, and Kern/Column.php carries a // @todo NO_ZERO_DATE.

DateParserTest::test_value_zero_is_a_real_value logs Incorrect DATETIME value: '0' on mysql:8.4 for ... WHERE date_created = '0'. MySQL 8's default strict mode (NO_ZERO_DATE/STRICT_TRANS_TABLES) rejects the zero-datetime that the DDL default (default '0000-00-00 00:00:00', Kern/Column.php ~2117) and the = '0' date comparison rely on. MariaDB is lenient by default.

Repro

bin/run-tests.sh -i mysql:8.4 -- --filter DateParserTest

Why it matters

Blocks promoting the MySQL legs to gating. Needs a strict-mode-safe zero/empty-date strategy (nullable, or a sentinel that survives NO_ZERO_DATE).

Non-gating in CI today.

Metadata

Metadata

Assignees

No one assigned

    Labels

    object: ColumnColumn definitions, validation, casting, and SQL fragments.object: Date ParserDate parser behavior and date-query compatibility.object: PlatformPlatform descriptor, engine detection, and PlatformProvider.type: BugA reproducible problem in the code.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions