133
@todo This test demonstrates an egregious bug. There is logic in
134
insert_pk_fields() that is just wrong.
136
DECLARE_TEST(t_mul_pkdel1)
142
ok_sql(hstmt, "DROP TABLE IF EXISTS t_mul_pkdel1");
143
ok_sql(hstmt, "CREATE TABLE t_mul_pkdel1 (a INT NOT NULL, b INT,"
144
"c VARCHAR(30) NOT NULL, PRIMARY KEY(a, c))");
145
ok_sql(hstmt, "INSERT INTO t_mul_pkdel1 VALUES (100,10,'MySQL1'),"
146
"(200,20,'MySQL2'),(300,20,'MySQL3'),(400,20,'MySQL4')");
148
ok_stmt(hstmt, SQLFreeStmt(hstmt, SQL_CLOSE));
150
ok_stmt(hstmt, SQLSetCursorName(hstmt, (SQLCHAR *)"venu", SQL_NTS));
152
ok_sql(hstmt, "SELECT a FROM t_mul_pkdel1");
154
ok_stmt(hstmt, SQLBindCol(hstmt, 1, SQL_C_LONG, &nData, 0, NULL));
156
ok_stmt(hstmt, SQLExtendedFetch(hstmt, SQL_FETCH_NEXT, 1, &pcrow, NULL));
157
ok_stmt(hstmt, SQLSetPos(hstmt, 1, SQL_POSITION, SQL_LOCK_NO_CHANGE));
159
ok_stmt(hstmt, SQLSetPos(hstmt, 1, SQL_DELETE, SQL_LOCK_NO_CHANGE));
160
ok_stmt(hstmt, SQLRowCount(hstmt, &nlen));
163
ok_stmt(hstmt, SQLFreeStmt(hstmt, SQL_UNBIND));
164
ok_stmt(hstmt, SQLFreeStmt(hstmt, SQL_CLOSE));
166
ok_sql(hstmt, "SELECT * FROM t_mul_pkdel1");
168
is_num(myrowcount(hstmt), 3);
170
ok_stmt(hstmt, SQLFreeStmt(hstmt, SQL_CLOSE));
172
ok_sql(hstmt, "DROP TABLE IF EXISTS t_mul_pkdel1");
179
133
Bug #24306: SQLBulkOperations always uses indicator varables' values from
301
255
ok_stmt(hstmt, SQLBulkOperations(hstmt, SQL_ADD));
257
/* Remove SQL_ATTR_ROW_BIND_OFFSET_PTR */
258
ok_stmt(hstmt, SQLSetStmtAttr(hstmt, SQL_ATTR_ROW_BIND_OFFSET_PTR,
303
261
ok_stmt(hstmt, SQLFreeStmt(hstmt, SQL_UNBIND));
304
262
ok_stmt(hstmt, SQLFreeStmt(hstmt, SQL_CLOSE));