Skip to content

Support DDL syntax validation without execution - #1253

Open
wayyoungboy wants to merge 1 commit into
oceanbase:masterfrom
wayyoungboy:fix-issue-1181-ddl-syntax
Open

wayyoungboy wants to merge 1 commit into
oceanbase:masterfrom
wayyoungboy:fix-issue-1181-ddl-syntax

Conversation

@wayyoungboy

Copy link
Copy Markdown
Member

Summary

  • detect DDL statements in obdiag tool sql_syntax and validate them with PREPARE instead of EXPLAIN
  • deallocate prepared statements after successful validation
  • update command and agent tool descriptions to mention EXPLAIN/PREPARE

Fixes #1181

Verification

  • PYTHONPATH=. python -m pytest test/handler/tools/test_sql_syntax_handler.py -q
  • PYTHONPATH=. python -m pytest test/handler/tools/test_sql_syntax_handler.py test/common/test_scene.py -q
  • black --check -S -l 256 src/handler/tools/sql_syntax_handler.py src/common/diag_cmd.py src/handler/agent/toolsets/obdiag.py test/handler/tools/test_sql_syntax_handler.py
  • python workflow_data/check_py_files.py .
  • git diff --check

Comment thread src/handler/tools/sql_syntax_handler.py Fixed
@wayyoungboy
wayyoungboy force-pushed the fix-issue-1181-ddl-syntax branch from 908bf84 to c54f3ce Compare June 7, 2026 18:26
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.

[Enhancement]: syntax validation without SQL Execution (via obdiag)

2 participants