oceanbase / oceanbase/seekdb

Fix column length mismatch: wr_sqlstat_view.SOURCE_IP is varchar(65) vs OB golden varchar(46)

Open Beginner friendly
#773 0 comments 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

Description

In the wr.wr_sqlstat_view, the SOURCE_IP column is defined as varchar(65), which does not match the OceanBase golden standard definition of varchar(46).

Actual Behavior:
The column is varchar(65).
Actual Behavior

Expected Behavior:
The column should be varchar(46) to align with the golden standard.
Expected Behavior

Steps to Reproduce

  1. Access the machine.
  2. Navigate to the directory: /obdata/data/AndroidTest/ob_opensource_test/tools/deploy.
    Directory
  3. Execute the following commands to set up the test environment and run the specific mysqltest:
export OCEANBASE_HOME=/obdata/data/AndroidTest/ob_opensource_test/
cd ${OCEANBASE_HOME}/tools/deploy
source activate_obd.sh
export OBD_SEEKDB_STATUS_FALLBACK_TCP=1

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 --init-only --init-sql-dir=${OCEANBASE_HOME}/tools/deploy --init-sql-files='init.sql,init_user.sql|root@sys|test'
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 --disable-reboot --test-set=wr.wr_sqlstat_view
  1. Connect to the database (using the same connection method and user as the test case: root@sys, database Oceanbase) and run the following SQL to inspect the column definitions:
-- Connection method and user same as test case: root@sys, database Oceanbase
USE Oceanbase;

SHOW TENANT;

DESC __all_virtual_sqlstat;
DESC v$ob_sqlstat;
DESC gv$ob_sqlstat;
DESC __wr_sqlstat;
DESC __wr_sqltext;
DESC DBA_WR_SQLSTAT;
DESC CDB_WR_SQLSTAT;
DESC DBA_WR_SQLTEXT;
DESC CDB_WR_SQLTEXT;

The discrepancy in the SOURCE_IP column length for wr.wr_sqlstat_view will be observed.

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 with the wr.wr_sqlstat_view definition and the wr.wr_sqlstat_view mysqltest named in the issue. Inspect the SOURCE_IP column alongside the OceanBase golden definition, then run the provided mysqltest setup and test commands. Done means SOURCE_IP is reported as varchar(46) and the test passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
databases
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.