You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2022/03/25 00:05:35 UTC

[GitHub] [ignite] alinaliBQ opened a new pull request #9908: [BUG] fix the bug of SQLGetStmtAttr

alinaliBQ opened a new pull request #9908:
URL: https://github.com/apache/ignite/pull/9908


   fix the error of SQLGetStmtAttr(SQL_ATTR_ROW_ARRAY_SIZE) returning the wrong value for row array size.
   I don't see any Jira tickets associated with this bug. This is my first PR to Apache Ignite, please let me know if there's anything that I'm missing here.
   
   Thank you for submitting the pull request to the Apache Ignite.
   
   In order to streamline the review of the contribution 
   we ask you to ensure the following steps have been taken:
   
   ### The Contribution Checklist
   - [ ] There is a single JIRA ticket related to the pull request. 
   - [ ] The web-link to the pull request is attached to the JIRA ticket.
   - [ ] The JIRA ticket has the _Patch Available_ state.
   - [ ] The pull request body describes changes that have been made. 
   The description explains _WHAT_ and _WHY_ was made instead of _HOW_.
   - [x] The pull request title is treated as the final commit message. 
   The following pattern must be used: `IGNITE-XXXX Change summary` where `XXXX` - number of JIRA issue.
   - [ ] A reviewer has been mentioned through the JIRA comments 
   (see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers)) 
   - [ ] The pull request has been checked by the Teamcity Bot and 
   the `green visa` attached to the JIRA ticket (see [TC.Bot: Check PR](https://mtcga.gridgain.com/prs.html))
   
   ### Notes
   - [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute)
   - [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules)
   - [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines)
   - [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot)
   
   If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite] isapego commented on pull request #9908: [BUG] fix the bug of SQLGetStmtAttr

Posted by GitBox <gi...@apache.org>.
isapego commented on pull request #9908:
URL: https://github.com/apache/ignite/pull/9908#issuecomment-1078801845


   Thanks for the report. Seems like an actual bug. Filed a ticket: IGNITE-16745


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite] alinaliBQ commented on a change in pull request #9908: IGNITE-16745 fix the bug of SQLGetStmtAttr

Posted by GitBox <gi...@apache.org>.
alinaliBQ commented on a change in pull request #9908:
URL: https://github.com/apache/ignite/pull/9908#discussion_r837693521



##########
File path: modules/platforms/cpp/odbc-test/src/api_robustness_test.cpp
##########
@@ -795,6 +795,31 @@ BOOST_AUTO_TEST_CASE(TestSQLSetStmtAttr)
     SQLSetStmtAttr(stmt, SQL_ATTR_ROW_ARRAY_SIZE, 0, 0);
 }
 
+BOOST_AUTO_TEST_CASE(TestSQLSetStmtAttrGetStmtAttr)
+{
+    // check that statement array size is set correctly 
+
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
+
+    SQLCHAR buffer[ODBC_BUFFER_SIZE];
+    SQLINTEGER resLen = 0;
+
+    // repeat test for different values
+    SQLULEN valList[5] = {10, 52, 81, 103, 304};
+    for (SQLULEN val : valList) {

Review comment:
       no worries. I made the change




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite] alinaliBQ commented on pull request #9908: IGNITE-16745 fix the bug of SQLGetStmtAttr

Posted by GitBox <gi...@apache.org>.
alinaliBQ commented on pull request #9908:
URL: https://github.com/apache/ignite/pull/9908#issuecomment-1081253918


   Nevermind, I found some tests for SQLSetStmtAttr and SQLGetStmtAttr, just no checks yet. I can work on those.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite] isapego commented on a change in pull request #9908: IGNITE-16745 fix the bug of SQLGetStmtAttr

Posted by GitBox <gi...@apache.org>.
isapego commented on a change in pull request #9908:
URL: https://github.com/apache/ignite/pull/9908#discussion_r837077572



##########
File path: modules/platforms/cpp/odbc-test/src/api_robustness_test.cpp
##########
@@ -795,6 +795,31 @@ BOOST_AUTO_TEST_CASE(TestSQLSetStmtAttr)
     SQLSetStmtAttr(stmt, SQL_ATTR_ROW_ARRAY_SIZE, 0, 0);
 }
 
+BOOST_AUTO_TEST_CASE(TestSQLSetStmtAttrGetStmtAttr)
+{
+    // check that statement array size is set correctly 
+
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
+
+    SQLCHAR buffer[ODBC_BUFFER_SIZE];
+    SQLINTEGER resLen = 0;
+
+    // repeat test for different values
+    SQLULEN valList[5] = {10, 52, 81, 103, 304};
+    for (SQLULEN val : valList) {

Review comment:
       Sorry, we do not use C++11 yet. Can you change this part to index form of for loop (`for (i = 0; ...)`)?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite] alinaliBQ commented on pull request #9908: IGNITE-16745 fix the bug of SQLGetStmtAttr

Posted by GitBox <gi...@apache.org>.
alinaliBQ commented on pull request #9908:
URL: https://github.com/apache/ignite/pull/9908#issuecomment-1079239308


   Thanks for creating the ticket! I've created an account for the Jira board. Would like to assign it to myself but it looks like I don't have access. 
   Also, it seems that there is no existing test for `SQLSetStmtAttr`, do I still need to create a test for this fix?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org