Modified:
branches/guffert/ChangeLog
branches/guffert/test/my_basics.c
Log:
Indent fixed in test case for 332014 and added entry to ChangeLog
Modified: branches/guffert/ChangeLog
===================================================================
--- branches/guffert/ChangeLog 2007-12-06 13:21:16 UTC (rev 929)
+++ branches/guffert/ChangeLog 2007-12-06 16:12:26 UTC (rev 930)
@@ -30,6 +30,7 @@
* ADO could not open a recordset that has a DECIMAL field (Bug #31720)
* SQLError() incorrectly cleared the error information, making it
unavailable from subsequent calls to SQLGetDiagRec().
+ * ADO was unable to open record set using dynamic cursor. (Bug #32014)
Includes changes from Connector/ODBC 3.51.21 and 3.51.22.
Modified: branches/guffert/test/my_basics.c
===================================================================
--- branches/guffert/test/my_basics.c 2007-12-06 13:21:16 UTC (rev 929)
+++ branches/guffert/test/my_basics.c 2007-12-06 16:12:26 UTC (rev 930)
@@ -702,76 +702,76 @@
*/
DECLARE_TEST(t_bug32014)
{
- SQLHENV henv1;
- SQLHDBC hdbc1;
- SQLHSTMT hstmt1;
- SQLUINTEGER info;
- long i=0;
- SQLSMALLINT value_len;
+ SQLHENV henv1;
+ SQLHDBC hdbc1;
+ SQLHSTMT hstmt1;
+ SQLUINTEGER info;
+ long i=0;
+ SQLSMALLINT value_len;
- long flags[]= { 0,
- (131072L << 4) /*FLAG_FORWARD_CURSOR*/,
- 32 /*FLAG_DYNAMIC_CURSOR*/,
- (131072L << 4) | 32,
- 0 };
+ long flags[]= { 0,
+ (131072L << 4) /*FLAG_FORWARD_CURSOR*/,
+ 32 /*FLAG_DYNAMIC_CURSOR*/,
+ (131072L << 4) | 32,
+ 0 };
- long expectedInfo[]= { SQL_SO_FORWARD_ONLY|SQL_SO_STATIC,
- SQL_SO_FORWARD_ONLY,
- SQL_SO_FORWARD_ONLY|SQL_SO_STATIC|SQL_SO_DYNAMIC,
- SQL_SO_FORWARD_ONLY };
+ long expectedInfo[]= { SQL_SO_FORWARD_ONLY|SQL_SO_STATIC,
+ SQL_SO_FORWARD_ONLY,
+ SQL_SO_FORWARD_ONLY|SQL_SO_STATIC|SQL_SO_DYNAMIC,
+ SQL_SO_FORWARD_ONLY };
- long expectedCurType[][4]= {
- {SQL_CURSOR_FORWARD_ONLY, SQL_CURSOR_STATIC, SQL_CURSOR_STATIC,
SQL_CURSOR_STATIC},
- {SQL_CURSOR_FORWARD_ONLY, SQL_CURSOR_FORWARD_ONLY, SQL_CURSOR_FORWARD_ONLY,
SQL_CURSOR_FORWARD_ONLY},
- {SQL_CURSOR_FORWARD_ONLY, SQL_CURSOR_STATIC, SQL_CURSOR_DYNAMIC,
SQL_CURSOR_STATIC},
- {SQL_CURSOR_FORWARD_ONLY, SQL_CURSOR_FORWARD_ONLY, SQL_CURSOR_FORWARD_ONLY,
SQL_CURSOR_FORWARD_ONLY}};
+ long expectedCurType[][4]= {
+ {SQL_CURSOR_FORWARD_ONLY, SQL_CURSOR_STATIC, SQL_CURSOR_STATIC,
SQL_CURSOR_STATIC},
+ {SQL_CURSOR_FORWARD_ONLY, SQL_CURSOR_FORWARD_ONLY, SQL_CURSOR_FORWARD_ONLY,
SQL_CURSOR_FORWARD_ONLY},
+ {SQL_CURSOR_FORWARD_ONLY, SQL_CURSOR_STATIC, SQL_CURSOR_DYNAMIC,
SQL_CURSOR_STATIC},
+ {SQL_CURSOR_FORWARD_ONLY, SQL_CURSOR_FORWARD_ONLY, SQL_CURSOR_FORWARD_ONLY,
SQL_CURSOR_FORWARD_ONLY}};
- do
- {
- SET_DSN_OPTION(flags[i]);
- alloc_basic_handles(&henv1, &hdbc1, &hstmt1);
+ do
+ {
+ SET_DSN_OPTION(flags[i]);
+ alloc_basic_handles(&henv1, &hdbc1, &hstmt1);
- printMessage("checking %d (%d)", i, flags[i]);
+ printMessage("checking %d (%d)", i, flags[i]);
- /*Checking that correct info is returned*/
+ /*Checking that correct info is returned*/
- ok_stmt(hstmt1, SQLGetInfo(hdbc1, SQL_SCROLL_OPTIONS,
- (SQLPOINTER) &info, sizeof(long), &value_len));
- is_num(info, expectedInfo[i]);
+ ok_stmt(hstmt1, SQLGetInfo(hdbc1, SQL_SCROLL_OPTIONS,
+ (SQLPOINTER) &info, sizeof(long), &value_len));
+ is_num(info, expectedInfo[i]);
- /*Checking that correct cursor type is set*/
+ /*Checking that correct cursor type is set*/
- ok_stmt(hstmt1, SQLSetStmtOption(hstmt1, SQL_CURSOR_TYPE
- , SQL_CURSOR_FORWARD_ONLY ));
- ok_stmt(hstmt1, SQLGetStmtOption(hstmt1, SQL_CURSOR_TYPE,
- (SQLPOINTER) &info));
- is_num(info, expectedCurType[i][SQL_CURSOR_FORWARD_ONLY]);
+ ok_stmt(hstmt1, SQLSetStmtOption(hstmt1, SQL_CURSOR_TYPE
+ , SQL_CURSOR_FORWARD_ONLY ));
+ ok_stmt(hstmt1, SQLGetStmtOption(hstmt1, SQL_CURSOR_TYPE,
+ (SQLPOINTER) &info));
+ is_num(info, expectedCurType[i][SQL_CURSOR_FORWARD_ONLY]);
- ok_stmt(hstmt1, SQLSetStmtOption(hstmt1, SQL_CURSOR_TYPE,
- SQL_CURSOR_KEYSET_DRIVEN ));
- ok_stmt(hstmt1, SQLGetStmtOption(hstmt1, SQL_CURSOR_TYPE,
- (SQLPOINTER) &info));
- is_num(info, expectedCurType[i][SQL_CURSOR_KEYSET_DRIVEN]);
+ ok_stmt(hstmt1, SQLSetStmtOption(hstmt1, SQL_CURSOR_TYPE,
+ SQL_CURSOR_KEYSET_DRIVEN ));
+ ok_stmt(hstmt1, SQLGetStmtOption(hstmt1, SQL_CURSOR_TYPE,
+ (SQLPOINTER) &info));
+ is_num(info, expectedCurType[i][SQL_CURSOR_KEYSET_DRIVEN]);
- ok_stmt(hstmt1, SQLSetStmtOption(hstmt1, SQL_CURSOR_TYPE,
- SQL_CURSOR_DYNAMIC ));
- ok_stmt(hstmt1, SQLGetStmtOption(hstmt1, SQL_CURSOR_TYPE,
- (SQLPOINTER) &info));
- is_num(info, expectedCurType[i][SQL_CURSOR_DYNAMIC]);
+ ok_stmt(hstmt1, SQLSetStmtOption(hstmt1, SQL_CURSOR_TYPE,
+ SQL_CURSOR_DYNAMIC ));
+ ok_stmt(hstmt1, SQLGetStmtOption(hstmt1, SQL_CURSOR_TYPE,
+ (SQLPOINTER) &info));
+ is_num(info, expectedCurType[i][SQL_CURSOR_DYNAMIC]);
- ok_stmt(hstmt1, SQLSetStmtOption(hstmt1, SQL_CURSOR_TYPE,
- SQL_CURSOR_STATIC ));
- ok_stmt(hstmt1, SQLGetStmtOption(hstmt1, SQL_CURSOR_TYPE,
- (SQLPOINTER) &info));
- is_num(info, expectedCurType[i][SQL_CURSOR_STATIC]);
+ ok_stmt(hstmt1, SQLSetStmtOption(hstmt1, SQL_CURSOR_TYPE,
+ SQL_CURSOR_STATIC ));
+ ok_stmt(hstmt1, SQLGetStmtOption(hstmt1, SQL_CURSOR_TYPE,
+ (SQLPOINTER) &info));
+ is_num(info, expectedCurType[i][SQL_CURSOR_STATIC]);
- free_basic_handles(&henv1, &hdbc1, &hstmt1);
+ free_basic_handles(&henv1, &hdbc1, &hstmt1);
- } while (flags[++i]);
+ } while (flags[++i]);
- SET_DSN_OPTION(0);
+ SET_DSN_OPTION(0);
- return OK;
+ return OK;
}
| Thread |
|---|
| • Connector/ODBC 3.51 commit: r930 - in branches/guffert: . test | lnovitsky | 6 Dec |