You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
void show_tables(int ac, char** av) {
std::shared_ptr<soci::session> sql;
string dsn = create_dsn(((ac > 1) ? av[1] : "localhost"));
sql.reset(new soci::session("mysql", dsn));
vector<string> result;
auto s = (*sql).prepare << "SHOW TABLES";
soci::rowset<soci::row> rowss = s;
for (auto& row : rowss) { // **fails here with the exception**
string data = row.get<string>(0);
result.push_back(data);
}
for (auto& val : result) {
cout << val << '\n';
}
}
Client OS OpenSuSE 15.5
when connecting to mariadb on another host, version of DB 11.0.2 - throws esception EXCEPTION:
Cannot convert data: string "<some_table_name>" is not a number while fetching data from "SHOW TABLES"
when connecting to host with mariadb version 5.6.43 (i.e. some very very old one)
NO ERRORS
when connecting to host with mariadb version 10.16.4
NO ERRORS
The text was updated successfully, but these errors were encountered:
Sorry, no idea what's going on here and I don't use MariaDB myself. Please try to debug it yourself, e.g. check where is the exception being thrown from exactly.
Sorry, no idea what's going on here and I don't use MariaDB myself. Please try to debug it yourself, e.g. check where is the exception being thrown from exactly.
Is there any sample bootstrap project. I'm compiling the SOCI lib locally and install it, so to change that need to figure out how to hook this up. If you can help - that will be great, thank you.
Ideal would be to add a failing unit test showing this problem and use the (existing) unit test to run it -- this should be simple to do and could be also used to test that it's fixed later.
Using SOCI (tag 4.0.3) and latest commit.
A code is something like this:
Client OS OpenSuSE 15.5
when connecting to mariadb on another host, version of DB 11.0.2 - throws esception
EXCEPTION:
Cannot convert data: string "<some_table_name>" is not a number while fetching data from "SHOW TABLES"
when connecting to host with mariadb version 5.6.43 (i.e. some very very old one)
NO ERRORS
when connecting to host with mariadb version 10.16.4
NO ERRORS
The text was updated successfully, but these errors were encountered: