sha174n opened a new pull request, #43991:
URL: https://github.com/apache/superset/pull/43991

   ### SUMMARY
   
   Shillelagh-backed databases (including Google Sheets) run on a full 
APSW/SQLite
   engine. ATTACH DATABASE is not part of a shillelagh connection's surface — 
the
   connector reaches its data through virtual-table adapters, not through
   additional SQLite files. Leaving ATTACH enabled lets a query on such a
   connection open unrelated local SQLite files.
   
   This adds a general `register_engine_events()` engine-spec hook (called once 
per
   engine creation) and uses it in `ShillelaghEngineSpec` to set the 
connection's
   attached-database limit to zero, so ATTACH is refused while ordinary queries 
are
   unaffected. It mirrors the `check_sqlalchemy_uri` guard in
   `analytics_db_safety.py`, which already excludes the bare
   sqlite/shillelagh/duckdb schemes at registration.
   
   ### TESTING INSTRUCTIONS
   
   New unit tests in `tests/unit_tests/db_engine_specs/test_shillelagh.py`: 
with the
   listener registered, ATTACH DATABASE is rejected while SELECT still works; a
   control test confirms ATTACH works without it.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue
   - [ ] Required feature flags
   - [ ] Changes UI
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to