You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2016/11/22 01:08:46 UTC

kylin git commit: KYLIN-2121 fix infinite SQLMoreResults calls by Excel/PowerBI

Repository: kylin
Updated Branches:
  refs/heads/master 5270d05fa -> e6d22ba2f


KYLIN-2121 fix infinite SQLMoreResults calls by Excel/PowerBI

Signed-off-by: lidongsjtu <li...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/e6d22ba2
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/e6d22ba2
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/e6d22ba2

Branch: refs/heads/master
Commit: e6d22ba2f737fecb3032a330d98fcf8e4aa4148a
Parents: 5270d05
Author: Yifan Zhang <ev...@gmail.com>
Authored: Tue Nov 22 00:12:23 2016 +0800
Committer: lidongsjtu <li...@apache.org>
Committed: Tue Nov 22 09:07:41 2016 +0800

----------------------------------------------------------------------
 odbc/Driver/KO_FETCH.CPP | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/e6d22ba2/odbc/Driver/KO_FETCH.CPP
----------------------------------------------------------------------
diff --git a/odbc/Driver/KO_FETCH.CPP b/odbc/Driver/KO_FETCH.CPP
index 880ed10..2153f97 100644
--- a/odbc/Driver/KO_FETCH.CPP
+++ b/odbc/Driver/KO_FETCH.CPP
@@ -699,7 +699,13 @@ RETCODE SQL_API SQLMoreResults ( HSTMT pStmt )
     __ODBCLOG ( _ODBCLogMsg ( LogLevel_DEBUG, "SQLMoreResults called" ) );
 
     pODBCStmt odbcStmt = ( pODBCStmt )pStmt;
-    if ( odbcStmt -> IRD . RowDesc != NULL )
+    
+    // check if stmt been released already
+    if ( ! odbcStmt -> Prepared )
+    {
+	return SQL_NO_DATA;
+    }
+    else if ( odbcStmt -> IRD . RowDesc != NULL )
     {
         // ------- THIS CASE SHOULD NOT OCCUR ----------
         // check if position is currently unknown