Skip to content

[Bug] ALTER TABLE changing ROW binlog.format returns wrong error message #65383

Description

@MoanasDaddyXu

Search before asking

  • I had searched in the issues and found no similar issues.

Version

Reproduced with the table stream regression case on local Doris HEAD d4a077caf8a.

Test environment:

regression-test/suites/table_stream_p0/test_binlog_property_alter_exception.groovy
remote log: /mnt/disk1/jianxu/case_output/doris/testrun/table_stream_p0_20260708/test_binlog_property_alter_exception.final.log
FE: 172.20.49.4:9030

What's Wrong?

When a table is created with ROW binlog enabled, changing binlog.format by ALTER TABLE ... SET should be rejected by the binlog format validation path.

The regression case expects an exception message containing:

not support change binlog format

However, Doris currently returns a generic light schema change error:

errCode = 2, detailMessage = only support light schema change operator when use table with binlog<Row>

This makes test_binlog_property_alter_exception fail on the first ALTER TABLE check.

What You Expected?

Changing binlog.format after table creation should fail with a clear binlog format error, for example:

not support change binlog format

How to Reproduce?

Regression case:

regression-test/suites/table_stream_p0/test_binlog_property_alter_exception.groovy

Failing SQL:

ALTER TABLE tbl_row_fmt SET ("binlog.format" = "STATEMENT_AND_SNAPSHOT");

Minimal flow:

CREATE TABLE tbl_row_fmt (
    k1 INT,
    v1 INT
)
UNIQUE KEY(k1)
DISTRIBUTED BY HASH(k1) BUCKETS 1
PROPERTIES (
    "replication_num" = "1",
    "enable_unique_key_merge_on_write" = "true",
    "binlog.enable" = "true",
    "binlog.format" = "ROW"
);

ALTER TABLE tbl_row_fmt SET ("binlog.format" = "STATEMENT_AND_SNAPSHOT");

Regression Test Result

suite: test_binlog_property_alter_exception
command: ALTER TABLE tbl_row_fmt SET ("binlog.format" = "STATEMENT_AND_SNAPSHOT")
expected: exception message contains "not support change binlog format"
actual: errCode = 2, detailMessage = only support light schema change operator when use table with binlog<Row>

Log excerpt:

2026-07-08 18:04:09.369 INFO  - Execute sql:
ALTER TABLE tbl_row_fmt SET ("binlog.format" = "STATEMENT_AND_SNAPSHOT")
2026-07-08 18:04:09.382 ERROR - Exception: java.sql.SQLException: errCode = 2, detailMessage = only support light schema change operator when use table with binlog<Row>
Caused by: java.lang.AssertionError: Expect exception msg contains 'not support change binlog format', but meet 'java.sql.SQLException: errCode = 2, detailMessage = only support light schema change operator when use table with binlog<Row>'

Anything Else?

Tracking issue: #65265

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions