drogonframework / drogonframework/drogon

Unable to execute multiple lines of MySQL commands

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

Description

**Describe the bug**
Syntax error when I trying to execute multiple lines of MySQL commands.
```
libc++abi.dylib: terminating with uncaught exception of type drogon::orm::SqlError: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SHOW TABLES' at line 2
```
**To Reproduce**
```c++
auto cli = drogon::orm::DbClient::newMysqlClient("blahblah");
cli->execSqlSync(R"EOF(
SHOW TABLES;
SHOW TABLES;
)EOF");
```

**Expected behavior**
SQL command executed without error or the framework could provide another multi line SQL interface.

**Screenshots**
NA

**Desktop (please complete the following information):**
NA

**Smartphone (please complete the following information):**
NA

**Additional context**
```
% mysql --version
mysql Ver 8.0.19 for osx10.15 on x86_64 (Homebrew)
```
Dragon v1.1.0 release

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.