Skip to content

Conversation

e-gonzalezz
Copy link

What problem were solved in this pull request?

Previously, obclient did not support multi-line SQL input.
When users entered a statement that spanned multiple lines (e.g., CREATE TABLE), the client failed to parse it and returned an error.

Issue Number: close #573

What is changed and how it works?

Enhanced the client input handling logic to buffer input until a terminating semicolon (;) is received.
Modified the prompt to match MySQL-style continuation (->) for multi-line queries.
Now, users can input SQL statements across multiple lines, and the client will execute them only when complete.

Example before:

miniob > create table t(
SQL_SYNTAX > Failed to parse sql

Example after:

miniob > create table t(
-> a int,
-> b int);
SUCCESS

Other information

Tested with CREATE TABLE both single-line and multi-line.

@CLAassistant
Copy link

CLAassistant commented Oct 1, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

obclient supports inputting multiple lines
2 participants