You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL 2072 Query Stats supress warning when calling libmysql::run
This commit is contained in:
committed by
Andrew Hutchings
parent
69e7880358
commit
1c0afc95bc
@ -96,7 +96,7 @@ int LibMySQL::init(const char* h, unsigned int p, const char* u, const char* w,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int LibMySQL::run(const char* query)
|
int LibMySQL::run(const char* query, bool resultExpected)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ int LibMySQL::run(const char* query)
|
|||||||
|
|
||||||
fRes = mysql_use_result(fCon);
|
fRes = mysql_use_result(fCon);
|
||||||
|
|
||||||
if (fRes == NULL)
|
if (fRes == NULL && resultExpected)
|
||||||
{
|
{
|
||||||
fErrStr = "fatal error running mysql_use_result() or empty result set in libmysql_client lib";
|
fErrStr = "fatal error running mysql_use_result() or empty result set in libmysql_client lib";
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
@ -36,7 +36,7 @@ public:
|
|||||||
int init(const char*, unsigned int, const char*, const char*, const char*);
|
int init(const char*, unsigned int, const char*, const char*, const char*);
|
||||||
|
|
||||||
// run the query
|
// run the query
|
||||||
int run(const char* q);
|
int run(const char* q, bool resultExpected = true);
|
||||||
|
|
||||||
void handleMySqlError(const char*, int);
|
void handleMySqlError(const char*, int);
|
||||||
|
|
||||||
|
@ -228,7 +228,7 @@ void QueryStats::insert()
|
|||||||
insert << fNumFiles << ", ";
|
insert << fNumFiles << ", ";
|
||||||
insert << fFileBytes << ")"; // the last 2 fields are not populated yet
|
insert << fFileBytes << ")"; // the last 2 fields are not populated yet
|
||||||
|
|
||||||
ret = mysql.run(insert.str().c_str());
|
ret = mysql.run(insert.str().c_str(), false);
|
||||||
|
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
mysql.handleMySqlError(mysql.getError().c_str(), ret);
|
mysql.handleMySqlError(mysql.getError().c_str(), ret);
|
||||||
|
Reference in New Issue
Block a user