diff --git a/test/basic.c b/test/basic.c index d9d6f3a..9d3d238 100644 --- a/test/basic.c +++ b/test/basic.c @@ -1732,6 +1732,12 @@ ODBC_TEST(t_odbc181) return OK; } +/* empty nts query crashes driver and application */ +ODBC_TEST(t_empty_stmt_crashes_driver) +{ + EXPECT_STMT(Stmt, SQLExecDirect(Stmt, "", SQL_NTS), SQL_ERROR); + return OK; +} MA_ODBC_TESTS my_tests[]= { @@ -1780,6 +1786,7 @@ MA_ODBC_TESTS my_tests[]= {t_odbc162, "t_odbc162_CTE_query", NORMAL }, {t_replace, "t_replace", NORMAL }, {t_odbc181, "t_odbc181", NORMAL }, + {t_empty_stmt_crashes_driver, "t_empty_stmt_crashes_driver", NORMAL }, {NULL, NULL, 0} };