Skip to content

The query results for timestamp_tz in MySQL do not match those in DuckDB. #166

@BsoBird

Description

@BsoBird

What happens?

mysql side:

create table TEST01(
  TZTEST TIMESTAMP(3)
);


insert into TEST01(TZTEST) VALUES(CURRENT_TIMESTAMP());

select * from TEST01
--  2025-10-29 18:36:01

duckdb side:

detach mysqldb;
ATTACH 'host=localhost user=root port=3306 database=test password=xxxxxx ' AS mysqldb (TYPE MYSQL_SCANNER);

select * from mysqldb.test01;
--2025-10-29 22:36:01.000 +0400

Why does the time queried in DuckDB not match the time in MySQL?

To Reproduce

mysql side:

create table TEST01(
  TZTEST TIMESTAMP(3)
);


insert into TEST01(TZTEST) VALUES(CURRENT_TIMESTAMP());

select * from TEST01
--  2025-10-29 18:36:01

duckdb side:

detach mysqldb;
ATTACH 'host=localhost user=root port=3306 database=test password=xxxxxx ' AS mysqldb (TYPE MYSQL_SCANNER);

select * from mysqldb.test01;
--2025-10-29 22:36:01.000 +0400
extension_name|loaded|installed|install_path                                                                                |description                                    |aliases  |extension_version|install_mode|installed_from|
--------------+------+---------+--------------------------------------------------------------------------------------------+-----------------------------------------------+---------+-----------------+------------+--------------+
mysql_scanner |true  |true     |C:\Users\BsoBird\.duckdb\extensions\v1.4.1\windows_amd64\mysql_scanner.duckdb_extension|Adds support for connecting to a MySQL database|{'mysql'}|c80647b          |REPOSITORY  |core          |

OS:

windows

MySQL Version:

8.0.42

DuckDB Version:

1.4.1

DuckDB Client:

java(DBEaver)

Full Name:

BsoBird

Affiliation:

github user

Have you tried this on the latest main branch?

  • I agree

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • I agree

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