[MDEV-8455] Make explicit_defaults_for_timestamp dynamic Created: 2015-07-13  Updated: 2021-05-11

Status: Open
Project: MariaDB Server
Component/s: Temporal Types
Fix Version/s: None

Type: Task Priority: Minor
Reporter: Alexander Barkov Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Blocks
is blocked by MDEV-3929 Add system variable explicit_defaults... Closed

 Description   

MDEV-3929 will merge a patch from MySQL that added a read-only variable explicit_defaults_for_timestamp.

This task will make explicit_defaults_for_timestamp dynamic and replication safe.

Monty suggested the following regarding replication of explicit_defaults_for_timestamp:

ok, the easy way to do this would be:
Change SELECT_DISTINCT from 1 to (1ULL << 39)
Add - OPTION_explicit_defaults_for_timestamp as 1
Add OPTION_explicit_defaults_for_timestamp to OPTIONS_WRITTEN_TO_BIN_LOG
In Query_log_event::do_apply_event set explicit_defaults_for_timestamp if OPTION_explicit_defaults_for_timestamp is set
That should help ensure:

  • If you replicate from mariadb to mariadb, the slave will follow the master
  • If you replicate from MySQL to MariaDB, you have to have the same setting for MySQL and MariaDB
    Not much we can do for the second case, but the first case is the important one

Generated at Thu Feb 08 07:27:17 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.