Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

sqlite virtual table silently returns empty rows for unavailable join parameters

Offen
#66,214 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@trivikr arbeitet bereits daran.

Seit 22.9.2026.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

sqlite
Version

main

Platform
All
Subsystem

sqlite

What steps will reproduce the bug?
import { DatabaseSync } from 'node:sqlite';

const db = new DatabaseSync(':memory:');

db.createModule('m', {
  columns: [
    { name: 'value', type: 'INTEGER' },
    { name: 'a', type: 'INTEGER', hidden: true },
  ],
  *rows(a) { if (a !== null) yield [a]; },
});

db.exec('CREATE TABLE t (a INTEGER)');
db.exec('INSERT INTO t VALUES (1), (2), (3)');

console.log(db.prepare('SELECT DISTINCT * FROM m(t.a) JOIN t ON t.a = m.a').all());
How often does it reproduce? Is there a required condition?

Always

What is the expected behavior? Why is that the expected behavior?

Per SQLite's Enforcing Required Parameters On Table-Valued Functions, xBestIndex() must return SQLITE_CONSTRAINT when a parameter has an EQ constraint whose usable flag is false, so the planner picks an ordering where the parameter is available. Cost estimates alone cannot enforce parameter dependencies.

What do you see instead?

rows() is called with null and the query returns []. xBestIndex() skips constraints with usable == false, accepts the unconstrained plan, and xFilter() passes Null(isolate).

Additional information

No response

Vorherrschende Sprache
JavaScript
Sterne
122k
Forks
37.4k
Ø Merge
4 T. 2 Std.
Gemergte PRs (30 T.)
277

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus nodejs/node

Alle Issues in nodejs/node

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.