From: Date: June 14 2007 5:56pm Subject: ODBC C-tests commit: r149 - trunk/testsuites/t_bug_procedure List-Archive: http://lists.mysql.com/commits/28776 Message-Id: <200706141556.l5EFubPY029696@bk-internal.mysql.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modified: trunk/testsuites/t_bug_procedure/bug16817.c Log: fix a syntax error Modified: trunk/testsuites/t_bug_procedure/bug16817.c =================================================================== --- trunk/testsuites/t_bug_procedure/bug16817.c 2007-06-14 15:51:47 UTC (rev 148) +++ trunk/testsuites/t_bug_procedure/bug16817.c 2007-06-14 15:56:37 UTC (rev 149) @@ -22,10 +22,9 @@ SQLRETURN rc; int i= 0; int j=0; + SQLLEN len; SQLHANDLE stmt= get_statement(); - SQLINTEGER *len= (SQLINTEGER *)malloc(sizeof(SQLINTEGER)); - char *qry= "call bug16817(42)"; OT_TODO("SQLNextReult has to implement and after this the test should work"); @@ -34,10 +33,15 @@ for (i= 0; (rc= SQLFetch(stmt)) == SQL_SUCCESS; ++i) { CHECK_SQL_S(SQLGetData(stmt, 1, SQL_C_CHAR, - rslt[i], STRLEN, &len[i]), stmt); + rslt[i], STRLEN, &len), stmt); test_printf("result: %s\n",rslt[i]); } test_printf("number of rows: %d\n",i); free_statement(stmt); - if (i<2) OT_FAIL("the bug is not fixed ..."); + if (i<2) OT_FAIL("to many rows were selected "); + else + { + if(strcmp(rslt[0],"aaa") != 0) OT_FAIL("wrong return from select statement"); + if(strcmp(rslt[1],"bbb") != 0) OT_FAIL("wrong return from select statement"); + } }