This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new ac9acc8 [fix](sample)(cpp) fix the condition of breaking for loop in
function (#8497)
ac9acc8 is described below
commit ac9acc8e9d02cb5268e55cabb8f45d45954ef2cd
Author: BrightHewei <[email protected]>
AuthorDate: Fri Mar 18 09:37:48 2022 +0800
[fix](sample)(cpp) fix the condition of breaking for loop in function
(#8497)
---
samples/connect/cpp/doris_client.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/connect/cpp/doris_client.cpp
b/samples/connect/cpp/doris_client.cpp
index 677b565..235c4f8 100644
--- a/samples/connect/cpp/doris_client.cpp
+++ b/samples/connect/cpp/doris_client.cpp
@@ -74,7 +74,7 @@ bool DorisClient::exec(const string& sql) {
std::cout << "Query result:" << std::endl;
for (int i = 0; i < num_rows; i++) {
_row = mysql_fetch_row(_result);
- if (_row < 0) {
+ if (_row == nullptr) {
break;
}
for (int j = 0; j < num_fields; j++) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]