oceanbase / oceanbase/seekdb

Fix inconsistent error message for trigger referencing non-existent table t.notable on macOS vs Linux

Open
#753 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dima type: bug
Dominant language
C++
Stars
2.9k
Forks
339
Avg merge
1d 19h
Merged PRs (30d)
52

Description

Environment

  • Version:
./bin/seekdb -V
Starting seekdb (OceanBase seekdb) source revision 1-86c590552f3c2eddc234225b5611a800d8f71898.
(null) (OceanBase seekdb)

REVISION: 1-86c590552f3c2eddc234225b5611a800d8f71898
BUILD_BRANCH: master
BUILD_TIME: May 11 2026 20:36:48
BUILD_FLAGS: RelWithDebInfo
BUILD_INFO:

Copyright (c) 2011-present OceanBase Inc.
  • Is this a temporary version provided by RD?: No
  • Reproducibility: Stable reproduction

Description

When a trigger references a non-existent table (e.g., t.notable), the error message displayed on macOS is inconsistent with the message displayed on Linux. Specifically, the macOS version does not show the table name in the error output.

Steps to Reproduce

  1. Run the mysqltest using the following command:
obd test mysqltest test_env \
  --mysqltest-bin=${OCEANBASE_HOME}/deps/3rd/u01/obclient/bin/mysqltest \
  --obclient-bin=${OCEANBASE_HOME}/deps/3rd/u01/obclient/bin/obclient \
  --auto-retry \
  --test-set=ddl.drop
  1. The test involves creating a trigger that references a non-existent table.

Test SQL:

CREATE TABLE table1(a int);
CREATE TABLE table2(b int);

# Database name is only available (for printing) if specified in 
# the trigger definition
CREATE TRIGGER trg1 AFTER INSERT ON table1
FOR EACH ROW
  INSERT INTO table2 SELECT t.notable.*;

#--error ER_BAD_TABLE_ERROR
INSERT INTO table1 VALUES (1);

DROP TABLE table1,table2;

Observed Behavior:

  • Linux seekdb output: Shows an error message that includes the table name.
  • macOS seekdb output: Shows an error message that does not include the table name.

Screenshots:

  • Linux output (error includes table name)
  • macOS output (error does not include table name)
    (Note: Image links from original content are preserved but not displayed in markdown)

Additional Information

  • Environment Details: Please provide connection strings for the problematic tenant and the sys tenant, as well as deployment information.
  • Is the scene preserved?
  • Log Information:

Notes

This issue was reported by an external business side. The issue type should be selected based on the actual situation: Customer Service Feedback, Online Issue, or Online Fault.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the provided mysqltest command and the trigger SQL in the ddl.drop test set on both macOS and Linux. Compare the ER_BAD_TABLE_ERROR output and trace the trigger error-reporting path to identify why the table name is omitted on macOS. Done means both platforms report the referenced table name consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, sql
Domain
databases, operating-systems, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.