Commit 9fcd390a by Konstantin Käfer

this shortcut leaks memory :/

parent e7a556fb
...@@ -389,7 +389,8 @@ void Database::ProfileCallback(void* db, const char* sql, sqlite3_uint64 nsecs) ...@@ -389,7 +389,8 @@ void Database::ProfileCallback(void* db, const char* sql, sqlite3_uint64 nsecs)
// Note: This function is called in the thread pool. // Note: This function is called in the thread pool.
// Note: Some queries, such as "EXPLAIN" queries, are not sent through this. // Note: Some queries, such as "EXPLAIN" queries, are not sent through this.
ProfileInfo* info = new ProfileInfo(); ProfileInfo* info = new ProfileInfo();
*info = (ProfileInfo){ std::string(sql), nsecs }; info->sql = std::string(sql);
info->nsecs = nsecs;
static_cast<Database*>(db)->debug_profile->send(info); static_cast<Database*>(db)->debug_profile->send(info);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment