drogonframework / drogonframework/drogon

SQLite3 support: "ATTACH DATABASE ..." Causes SIGSEGV

Open
#2,134 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
14.3k
Forks
1.4k
Avg merge
1d 13h
Merged PRs (30d)
14

Description

**Describe the bug**
As the title suggests, trying to run `"ATTACH DATABASE '/folder/filename.db' AS NAME;"` with `execSqlSync()` will SIGSEGV almost immediately.

**To Reproduce**
Steps to reproduce the behavior:
1. In my case, I have a websocket drogon app (the only requirement might be to use a SQLite3 db pointer)
2. Create a new SQLite3 client.
3. Run `exampleDbPtr->execSqlSync("ATTACH DATABASE '/folder/filename.db' AS NAME;");` with an existing file.
4. Attempting to create a table in the attached db will now give an error that says `terminated by signal SIGSEGV (Address boundary error)`

**Expected behavior**
ATTACH DATABASE should not SIGSEGV

**Desktop (please complete the following information):**
- OS: WSL2: Debian 12 (x64)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.