Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

MySQL single-statement guard: differential fuzzing and fail-closed gaps

Aperta
#51 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
mariadb, mysql, react, rust, tauri, typescript

Direzione di ricerca

Read src-tauri/src/driver/mysql.rs, src-tauri/src/safety.rs, src-tauri/tests/mysql_compound.rs, and src/features/editor/splitStatements.ts, along with the linked plan notes. Start by running the existing MySQL compound tests and tracing how has_multiple_statements handles the listed gaps. Done means each gap is tested or documented as refused, and the optional differential fuzz harness finds no case where MySQL or MariaDB executes two statements while the guard accepts the input.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area:backend area:security size:L status:ready type:task
Context

MySQL always enables multi-statements, so the driver refuses any input its lexer sees as more than one statement (has_multiple_statements, plus executable comments read both ways and the session charset / sql_mode re-read). The guard is fail-closed but has never been fuzzed against the real server parser.
Source: docs/notes/plan-04-followups.md (R27 fuzzing, Task 8 fail-closed limits), docs/notes/plan-05-followups.md (Task 2 version digits).

To do
  • Differential fuzzing: generate inputs (comments, quotes, executable comments, compound bodies, charsets, sql_modes) and compare has_multiple_statements with what MySQL 8 / MariaDB 11 actually run (e.g. a marker table written by a second statement).
  • Lexers read every digit after /*! as the version, where MySQL reads 5–6 (fail-safe today).
  • Functional gaps of the fail-closed tracker: MariaDB FOR … DO … END FOR loops refused / mis-split by the frontend; unquoted end in an IF / WHILE condition refused; a (SELECT …) statement in a body refused; a label named begin refused; Run on a DELIMITER ; line runs the previous statement; the separator-less second CREATE is tested in Rust only, not in splitStatements.
Acceptance criteria
  • A fuzz harness under src-tauri/tests/ (ignored by default, documented how to run) with no case where the server runs two statements and the guard accepts the input
  • Each functional gap either accepted correctly with a test or documented as refused
  • pnpm test && pnpm lint green (and pnpm test:rust when src-tauri/ changes)
Files likely touched
  • src-tauri/src/driver/mysql.rs, src-tauri/src/safety.rs, src-tauri/tests/mysql_compound.rs
  • src/features/editor/splitStatements.ts
Related plan / spec

docs/notes/plan-04-followups.md#still-open-from-the-final-review-fix-wave-scope-excluded-them

Lingua principale
TypeScript
Stelle
0
Fork
0
Merge medio
1h 19m
PR unite (30g)
28

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Cemoche/tablemax

Tutte le issue di Cemoche/tablemax

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.