From: Date: May 31 2007 2:14am Subject: Connector/ODBC 3.51 commit: r455 - in trunk/test: . include List-Archive: http://lists.mysql.com/commits/27745 Message-Id: <200705310014.l4V0EGSQ023475@bk-internal.mysql.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modified: trunk/test/include/mytest3.h trunk/test/my_result.c Log: Handle if last argument of SQLColAttribute() is a pointer to a SQLINTEGER or SQLLEN. Modified: trunk/test/include/mytest3.h =================================================================== --- trunk/test/include/mytest3.h 2007-05-30 20:35:29 UTC (rev 454) +++ trunk/test/include/mytest3.h 2007-05-31 00:14:15 UTC (rev 455) @@ -257,12 +257,16 @@ static void my_print_dashes(SQLHSTMT hstmt, SQLSMALLINT nCol) { SQLRETURN rc; - SQLINTEGER field_count, disp_size, nullable; +#ifdef USE_SQLCOLATTRIBUTE_SQLLEN_PTR + SQLLEN disp_size, nullable; +#else + SQLINTEGER disp_size, nullable; +#endif SQLCHAR ColName[MAX_NAME_LEN+1]; - SQLUSMALLINT i, j; + SQLUSMALLINT field_count, i, j; SQLSMALLINT col_len; - field_count= (SQLINTEGER)nCol; + field_count= (SQLUSMALLINT)nCol; printMessage( "\t" ); printMessage( "+" ); Modified: trunk/test/my_result.c =================================================================== --- trunk/test/my_result.c 2007-05-30 20:35:29 UTC (rev 454) +++ trunk/test/my_result.c 2007-05-31 00:14:15 UTC (rev 455) @@ -1351,13 +1351,17 @@ { SQLCHAR lsptr[40]; SQLSMALLINT lslen; +#ifdef USE_SQLCOLATTRIBUTE_SQLLEN_PTR SQLLEN lnptr; +#else + SQLINTEGER lnptr; +#endif ok_stmt(hstmt, SQLFreeStmt(hstmt,SQL_CLOSE)); ok_sql(hstmt, "SELECT * FROM t_colattr"); - ok_stmt(hstmt, SQLColAttributes(hstmt, cno, attribute, lsptr, sizeof(lsptr), - &lslen, &lnptr)); + ok_stmt(hstmt, SQLColAttribute(hstmt, cno, attribute, lsptr, sizeof(lsptr), + &lslen, &lnptr)); if (sptr) { is_num(lslen, slen);