oceanbase / oceanbase/obclient

[Bug]: [OBClient 2.2.3] "\G" could not mark the end of sql statements in some cases

Open
#22 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
94
Forks
42
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

\G 放到末行尾 不会触发自动执行:
image

\G 单独放到下面一行 就可以触发自动执行的:
image

Environment

[admin@h07f02191.sqa.eu95 /home/admin]$ obclient -V
obclient Ver 2.2.3 Distrib 10.4.18-MariaDB, for Linux (x86_64) using readline 5.1

[admin@h07f02191.sqa.eu95 /home/admin]$ rpm -qa | grep obclient
libobclient-2.2.2-20230315104242.el7.x86_64
obclient-2.2.3-20230808103716.el7.x86_64

Fast reproduce steps

select
p.*
from
SYS.ALL_VIRTUAL_PART_AGENT p,
SYS.ALL_VIRTUAL_TABLE_AGENT tab ,
SYS.ALL_VIRTUAL_DATABASE_AGENT db
where
db.DATABASE_ID = tab.DATABASE_ID
and tab.DATABASE_ID = db.DATABASE_ID
and p.TABLE_ID = tab.TABLE_ID
and db.DATABASE_NAME = 'SYS'
and tab.TABLE_NAME = 'T2_M_LH'
and p.PART_NAME = 'P1'

Expected behavior

No response

Actual behavior

No response

Additional context

No response

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 reproducing the SQL input in the obclient command, comparing \G at the end of the final line with \G on its own line. Trace the client’s statement-termination handling and add or update a focused test if the repository provides one. Done means both forms trigger the expected automatic execution.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux, mariadb, sql
Domain
cli, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.