This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch dev-1.0.1
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git

commit 0b0bd8785af3b5fdee0f84d856b7c093ec3b1cc2
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]

Reply via email to