Skip to content

Commit 1831e9d

Browse files
committed
Reverted erroneous change made in previous commits that broke the compilation.
Fixed SQLCancelHandle test on non-Windows platforms for the case of RS streaming (on Windows it was fixed before)
1 parent 3161979 commit 1831e9d

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

driver/class/ServerSidePreparedStatement.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ namespace mariadb
328328
{
329329
// Assuming paramset skip is set in the indicator of 1st column
330330
if (bind->u.indicator && *bind->u.indicator == STMT_INDICATOR_IGNORE_ROW) {
331-
return '\0';
331+
return NULL;
332332
}
333333
// We can't let the callback to throw - we have to intercept, as otherwise we are guaranteed to have
334334
// the protocol broken
@@ -360,7 +360,7 @@ namespace mariadb
360360
{
361361
return (my_bool*)&error;
362362
}
363-
return '\0';
363+
return NULL;
364364
}
365365

366366

test/basic.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ ODBC_TEST(sqlcancel_threaded)
957957

958958
pthread_create(&thread, NULL, cancel_in_one_second, Stmt);
959959

960-
if (IsMysql || (ForwardOnly == TRUE && NoCache == TRUE))
960+
if (IsMysql || RSSTREAMING)
961961
{
962962
/**/
963963
OK_SIMPLE_STMT(Stmt, "SELECT SLEEP(5)");
@@ -1021,16 +1021,24 @@ ODBC_TEST(sqlcancelhandle)
10211021
}
10221022
else
10231023
{
1024-
EXPECT_STMT(Stmt, SQLExecDirect(Stmt, "SELECT SLEEP(5)", SQL_NTS), SQL_ERROR);
1024+
if (RSSTREAMING)
1025+
{
1026+
OK_SIMPLE_STMT(Stmt, "SELECT SLEEP(5)");
1027+
EXPECT_STMT(Stmt, SQLFetch(Stmt), SQL_ERROR);
1028+
}
1029+
else
1030+
{
1031+
EXPECT_STMT(Stmt, SQLExecDirect(Stmt, "SELECT SLEEP(5)", SQL_NTS), SQL_ERROR);
1032+
}
10251033
}
1026-
10271034
pthread_join(thread, NULL);
1028-
10291035
return OK;
10301036
}
10311037
#endif // ifndef HAVE_NOT_SQLCANCELHANDLE
10321038
#endif // ifdef _WIN32
10331039

1040+
// Not sure what is this test about. Maybe that SQLDescribeCol does not crash/return error
1041+
// with given parameters combination. Otherwise looks useless.
10341042
ODBC_TEST(t_describe_nulti)
10351043
{
10361044
SQLHENV henv1;

0 commit comments

Comments
 (0)