8000 sqlite3 CLI does not recognize dot commands with trailing spaces · Issue #133439 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

sqlite3 CLI does not recognize dot commands with trailing spaces #133439

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tanloong opened this issue May 5, 2025 · 3 comments
Closed

sqlite3 CLI does not recognize dot commands with trailing spaces #133439

tanloong opened this issue May 5, 2025 · 3 comments
Labels
stdlib Python modules in the Lib dir topic-sqlite3 type-bug An unexpected behavior, bug, or error

Comments

@tanloong
Copy link
Contributor
tanloong commented May 5, 2025

Bug report

Bug description:

Dot commands with trailing spaces are mistaken for multi-line sqlite3 statements.

$ python -m sqlite3↵
sqlite> .version↵
3.49.1
sqlite> .version␣↵
    ... ↵
    ... ↵

CPython versions tested on:

3.14

Operating systems tested on:

Linux

Linked PRs

@picnixz
Copy link
Member
picnixz commented May 5, 2025

Does the sqlite3 cli (not python one) ignore trailing whitespaces?

@tanloong
Copy link
Contributor Author
tanloong commented May 5, 2025

Yes. The sqlite3 cli works normally on sql statements with trailing or leading whitespaces.Image

@tanloong
Copy link
Contributor Author
tanloong commented May 6, 2025

Trailing whitespaces for dot commands are also ignored, although leading ones are not.

$ sqlite3↵
sqlite> .quit␣↵
$ 

$ sqlite3↵
sqlite> ␣.quit↵
    ... ↵
    ... ↵

tanloong added a commit to tanloong/cpython that referenced this issue May 9, 2025
serhiy-storchaka pushed a commit that referenced this issue May 9, 2025
…ti-line sqlite statements in the sqlite3 command-line interface (GH-133440)
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 9, 2025
…or multi-line sqlite statements in the sqlite3 command-line interface (pythonGH-133440)

(cherry picked from commit ebd4881)

Co-authored-by: Tan Long <tanloong@foxmail.com>
@tanloong tanloong closed this as completed May 9, 2025
serhiy-storchaka pushed a commit that referenced this issue May 9, 2025
…for multi-line sqlite statements in the sqlite3 command-line interface (GH-133440) (GH-133738)

(cherry picked from commit ebd4881)

Co-authored-by: Tan Long <tanloong@foxmail.com>
tanloong added a commit to tanloong/cpython that referenced this issue May 9, 2025
…or multi-line sqlite statements in the sqlite3 command-line interface (pythonGH-133440)

(cherry picked from commit ebd4881)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir topic-sqlite3 type-bug An unexpected behavior, bug, or error
Projects
Status: Done
Development

No branches or pull requests

2 participants
0