示例#1
0
文件: file.c 项目: qixin/wiredtiger
void
obj_upgrade(void)
{
	WT_SESSION *session;
	int ret;

	if ((ret = conn->open_session(conn, NULL, NULL, &session)) != 0)
		die("conn.session", ret);

	if ((ret = session->upgrade(session, uri, NULL)) != 0)
		if (ret != ENOENT)
			die("session.upgrade", ret);

	if ((ret = session->close(session, NULL)) != 0)
		die("session.close", ret);
}
示例#2
0
文件: file.c 项目: DINKIN/mongo
void
obj_upgrade(void)
{
	WT_SESSION *session;
	int ret;

	if ((ret = conn->open_session(conn, NULL, NULL, &session)) != 0)
		testutil_die(ret, "conn.session");

	if ((ret = session->upgrade(session, uri, NULL)) != 0)
		if (ret != ENOENT && ret != EBUSY)
			testutil_die(ret, "session.upgrade");

	if ((ret = session->close(session, NULL)) != 0)
		testutil_die(ret, "session.close");
}