Modified:
trunk/testsuites/t_bugs_crash/bug_25850.c
trunk/testsuites/t_bugs_time/bug_12520.c
Log:
document and fix bug_12520.c, this test should work now
Modified: trunk/testsuites/t_bugs_crash/bug_25850.c
===================================================================
--- trunk/testsuites/t_bugs_crash/bug_25850.c 2007-05-14 11:11:56 UTC (rev 104)
+++ trunk/testsuites/t_bugs_crash/bug_25850.c 2007-05-14 11:48:19 UTC (rev 105)
@@ -31,11 +31,11 @@
{
SQLHANDLE stmt = get_statement();
SQLSMALLINT column_count;
- SQLCHAR sz_catalog[NAME_LEN], sz_schema[NAME_LEN];
- SQLCHAR sz_table_name[NAME_LEN], sz_column_name[NAME_LEN];
+ SQLCHAR sz_catalog[NAME_LEN], sz_schema[NAME_LEN];
+ SQLCHAR sz_table_name[NAME_LEN], sz_column_name[NAME_LEN];
SQLRETURN retcode;
- SQLINTEGER cb_catalog, cb_schema, cb_table_name, cb_column_name;
-
+ SQLINTEGER cb_catalog, cb_schema, cb_table_name, cb_column_name;
+
/* Do not check the result with assetrion macro, we need SQL_NO_DATA */
SQLColumns(stmt,
(SQLCHAR*)"", SQL_NTS, /* All catalogs */
@@ -47,32 +47,32 @@
/* SQLColumns should return 18 columns in the resultset */
OT_ASSERT_INT_MSG("Wrong count of fields", 18, column_count);
-
- SQLBindCol(stmt, 1, SQL_C_CHAR, sz_catalog, NAME_LEN, &cb_catalog);
- SQLBindCol(stmt, 2, SQL_C_CHAR, sz_schema, NAME_LEN, &cb_schema);
- SQLBindCol(stmt, 3, SQL_C_CHAR, sz_table_name, NAME_LEN,&cb_table_name);
- SQLBindCol(stmt, 4, SQL_C_CHAR, sz_column_name, NAME_LEN, &cb_column_name);
+ SQLBindCol(stmt, 1, SQL_C_CHAR, sz_catalog, NAME_LEN, &cb_catalog);
+ SQLBindCol(stmt, 2, SQL_C_CHAR, sz_schema, NAME_LEN, &cb_schema);
+ SQLBindCol(stmt, 3, SQL_C_CHAR, sz_table_name, NAME_LEN,&cb_table_name);
+ SQLBindCol(stmt, 4, SQL_C_CHAR, sz_column_name, NAME_LEN, &cb_column_name);
+
CHECK_SQL_S(SQLFetch(stmt), stmt);
- free_statement(stmt);
+ free_statement(stmt);
}
OT_TEST_METHOD(bug_25850_test3)
{
SQLHANDLE stmt = get_statement();
SQLSMALLINT column_count;
- SQLCHAR sz_type_name[NAME_LEN];
- SQLRETURN retcode;
- SQLINTEGER cb_type_name;
+ SQLCHAR sz_type_name[NAME_LEN];
+ SQLRETURN retcode;
+ SQLINTEGER cb_type_name;
CHECK_SQL_S(SQLGetTypeInfo(stmt, SQL_TINYINT), stmt);
CHECK_SQL_S(SQLNumResultCols(stmt, &column_count), stmt);
/* SQLGetTypeInfo should return 19 columns in the resultset */
OT_ASSERT_INT_MSG("Wrong count of fields", 19, column_count);
-
- SQLBindCol(stmt, 1, SQL_C_CHAR, sz_type_name, NAME_LEN, &cb_type_name);
+ SQLBindCol(stmt, 1, SQL_C_CHAR, sz_type_name, NAME_LEN, &cb_type_name);
+
CHECK_SQL_S(SQLFetch(stmt), stmt);
- free_statement(stmt);
-}
\ No newline at end of file
+ free_statement(stmt);
+}
Modified: trunk/testsuites/t_bugs_time/bug_12520.c
===================================================================
--- trunk/testsuites/t_bugs_time/bug_12520.c 2007-05-14 11:11:56 UTC (rev 104)
+++ trunk/testsuites/t_bugs_time/bug_12520.c 2007-05-14 11:48:19 UTC (rev 105)
@@ -1,10 +1,19 @@
+/* ******************************************
+ * This test is to re-construct the situation
+ * of bug 12520.
+ * Today this bug is fixed and this test
+ * should return ok.
+ *
+ * documented/syntax fixed: 05/14/2007 susanne
+ * created: georg
+
+ ****************************************** */
+
#include "t_bugs_time_suite.h"
-
OT_TEST_METHOD(bug_12520_test1)
{
-test_printf("ghi\n");
- SQLHANDLE stmt = get_statement();
+ SQLHANDLE stmt;
SQLINTEGER my_time_cb;
SQLINTEGER my_date_cb;
SQL_TIMESTAMP_STRUCT my_time_ts;
@@ -13,6 +22,7 @@
SQLLEN len;
char datetime[50];
+ stmt= get_statement();
CHECK_SQL_S(SQLExecDirect(stmt,
"INSERT INTO bug12520 (c) values (1)",
SQL_NTS), stmt);
| Thread |
|---|
| • ODBC C-tests commit: r105 - in trunk/testsuites: t_bugs_crash t_bugs_time | sebrecht | 14 May |