-
Type:
Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
None
Hi!
I found that even if I specify 'force' flag to WT_SESSION::drop() I got ENOENT error for non-existent index.
Small test:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wiredtiger.h>
#define WT_CALL(call) \
do { \
const int __rc = call; \
if (__rc != 0) { \
fprintf(stderr, # call " at (%s:%d) failed: %s [%d]\n", __FILE__, __LINE__, wiredtiger_strerror(__rc), __rc); \
exit(EXIT_FAILURE); \
} \
} while (0)
int
main(void)
{
WT_CONNECTION *conn;
WT_SESSION *session;
WT_CALL(wiredtiger_open(NULL, NULL, "create", &conn));
WT_CALL(conn->open_session(conn, NULL, NULL, &session));
WT_CALL(session->drop(session, "table:non-existent", "force")); // ok
WT_CALL(session->create(session, "table:access", NULL));
WT_CALL(session->drop(session, "index:access:non-existent", "force")); // fails
WT_CALL(conn->close(conn, NULL));
return 0;
}