I have an application that does the following:
unsigned int some_db::client_id_query(std::string &client_username,
Query client_id_query = m_connection.query();
client_id_query << "select client_id from clients where
<< quote_only << client_username << " and client_password
<< quote_only << client_password;
cout << "Query created\n";
Result client_id_result = client_id_query.store();
cout << "Result received\n";
if (client_id_row = client_id_result.at(0)) // It hangs
here, and eventually hard crashes.
catch (exception &e)
error_msg = e.what();
error_msg = "Unknown exception";
The output is:
Connected to the some database (this is from the main function)
Result received (hangs here for about 20-30 seconds and than hard
I can perform a manual query in the database using the mysql client
and it returns a result without issue.
What would cause it to hang for about 20-30 seconds at the
If there is something fundamentally wrong with this code I would be
grateful for any advice.