Skip to content

Different timestamp between INSERT and SELECT #295

Description

@mniewrzal

With version v1.5.43 timestamps returned by INSERT and SELECT doesn't match.

How to reproduce:

CREATE TABLE IF NOT EXISTS objects
(
    version	INT64     NOT NULL,
    created_at	TIMESTAMP NOT NULL DEFAULT (CURRENT_TIMESTAMP()),
) PRIMARY KEY (version)

INSERT INTO objects (version) VALUES(1) THEN RETURN objects.created_at

SELECT created_at from objects where version = 1

Sample output:

INSERT INTO objects (version) VALUES(1) THEN RETURN objects.created_at
created_at
2025-11-20T10:36:22.906313Z

SELECT created_at from objects where version = 1
created_at
2025-11-20T10:36:22.906463Z <- doesn't match previous value

For production Spanner instance this sample returns the same values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions