Lines Matching refs:rc

47 	int rc, mode = 0644, flags = MDB_NOSUBDIR;  in DBA_OPEN_FUNC()  local
56 rc = mdb_env_create(&env); in DBA_OPEN_FUNC()
57 if (rc) { in DBA_OPEN_FUNC()
58 *error = mdb_strerror(rc); in DBA_OPEN_FUNC()
62 rc = mdb_env_open(env, info->path, flags, mode); in DBA_OPEN_FUNC()
63 if (rc) { in DBA_OPEN_FUNC()
64 *error = mdb_strerror(rc); in DBA_OPEN_FUNC()
68 rc = mdb_txn_begin(env, NULL, 0, &txn); in DBA_OPEN_FUNC()
69 if (rc) { in DBA_OPEN_FUNC()
71 *error = mdb_strerror(rc); in DBA_OPEN_FUNC()
82 rc = mdb_dbi_open(txn, NULL, 0, &LMDB_IT(dbi)); in DBA_OPEN_FUNC()
83 if (rc) { in DBA_OPEN_FUNC()
86 *error = mdb_strerror(rc); in DBA_OPEN_FUNC()
108 int rc; in DBA_FETCH_FUNC() local
113 rc = mdb_txn_renew(LMDB_IT(txn)); in DBA_FETCH_FUNC()
115 rc = mdb_txn_begin(LMDB_IT(env), NULL, MDB_RDONLY, &LMDB_IT(txn)); in DBA_FETCH_FUNC()
117 if (rc) { in DBA_FETCH_FUNC()
118 php_error_docref1(NULL, key, E_WARNING, "%s", mdb_strerror(rc)); in DBA_FETCH_FUNC()
125 rc = mdb_get(LMDB_IT(txn), LMDB_IT(dbi), &k, &v); in DBA_FETCH_FUNC()
126 if (rc) { in DBA_FETCH_FUNC()
127 if (MDB_NOTFOUND != rc) { in DBA_FETCH_FUNC()
128 php_error_docref1(NULL, key, E_WARNING, "%s", mdb_strerror(rc)); in DBA_FETCH_FUNC()
150 int rc; in DBA_UPDATE_FUNC() local
153 rc = mdb_txn_begin(LMDB_IT(env), NULL, 0, &LMDB_IT(txn)); in DBA_UPDATE_FUNC()
154 if (rc) { in DBA_UPDATE_FUNC()
155 php_error_docref2(NULL, key, val, E_WARNING, "%s", mdb_strerror(rc)); in DBA_UPDATE_FUNC()
164 rc = mdb_put(LMDB_IT(txn), LMDB_IT(dbi), &k, &v, mode == 1 ? MDB_NOOVERWRITE : 0); in DBA_UPDATE_FUNC()
165 if (rc) { in DBA_UPDATE_FUNC()
166 if (MDB_KEYEXIST != rc) { in DBA_UPDATE_FUNC()
167 php_error_docref2(NULL, key, val, E_WARNING, "%s", mdb_strerror(rc)); in DBA_UPDATE_FUNC()
173 rc = mdb_txn_commit(LMDB_IT(txn)); in DBA_UPDATE_FUNC()
174 if (rc) { in DBA_UPDATE_FUNC()
175 php_error_docref2(NULL, key, val, E_WARNING, "%s", mdb_strerror(rc)); in DBA_UPDATE_FUNC()
185 int rc; in DBA_EXISTS_FUNC() local
189 rc = mdb_txn_renew(LMDB_IT(txn)); in DBA_EXISTS_FUNC()
191 rc = mdb_txn_begin(LMDB_IT(env), NULL, MDB_RDONLY, &LMDB_IT(txn)); in DBA_EXISTS_FUNC()
193 if (rc) { in DBA_EXISTS_FUNC()
194 php_error_docref1(NULL, key, E_WARNING, "%s", mdb_strerror(rc)); in DBA_EXISTS_FUNC()
201 rc = mdb_get(LMDB_IT(txn), LMDB_IT(dbi), &k, &v); in DBA_EXISTS_FUNC()
202 if (rc) { in DBA_EXISTS_FUNC()
203 if (MDB_NOTFOUND != rc) { in DBA_EXISTS_FUNC()
204 php_error_docref1(NULL, key, E_WARNING, "%s", mdb_strerror(rc)); in DBA_EXISTS_FUNC()
221 int rc; in DBA_DELETE_FUNC() local
224 rc = mdb_txn_begin(LMDB_IT(env), NULL, 0, &LMDB_IT(txn)); in DBA_DELETE_FUNC()
225 if (rc) { in DBA_DELETE_FUNC()
226 php_error_docref1(NULL, key, E_WARNING, "%s", mdb_strerror(rc)); in DBA_DELETE_FUNC()
233 rc = mdb_del(LMDB_IT(txn), LMDB_IT(dbi), &k, NULL); in DBA_DELETE_FUNC()
234 if (!rc) { in DBA_DELETE_FUNC()
235 rc = mdb_txn_commit(LMDB_IT(txn)); in DBA_DELETE_FUNC()
236 if (rc) { in DBA_DELETE_FUNC()
237 php_error_docref1(NULL, key, E_WARNING, "%s", mdb_strerror(rc)); in DBA_DELETE_FUNC()
244 php_error_docref1(NULL, key, E_WARNING, "%s", mdb_strerror(rc)); in DBA_DELETE_FUNC()
251 int rc; in DBA_FIRSTKEY_FUNC() local
255 rc = mdb_txn_begin(LMDB_IT(env), NULL, MDB_RDONLY, &LMDB_IT(txn)); in DBA_FIRSTKEY_FUNC()
256 if (rc) { in DBA_FIRSTKEY_FUNC()
257 php_error_docref0(NULL, E_WARNING, "%s", mdb_strerror(rc)); in DBA_FIRSTKEY_FUNC()
261 rc = mdb_cursor_open(LMDB_IT(txn), LMDB_IT(dbi), &LMDB_IT(cur)); in DBA_FIRSTKEY_FUNC()
262 if (rc) { in DBA_FIRSTKEY_FUNC()
264 php_error_docref0(NULL, E_WARNING, "%s", mdb_strerror(rc)); in DBA_FIRSTKEY_FUNC()
268 rc = mdb_cursor_get(LMDB_IT(cur), &k, &v, MDB_FIRST); in DBA_FIRSTKEY_FUNC()
269 if (rc) { in DBA_FIRSTKEY_FUNC()
273 if (MDB_NOTFOUND != rc) { in DBA_FIRSTKEY_FUNC()
274 php_error_docref0(NULL, E_WARNING, "%s", mdb_strerror(rc)); in DBA_FIRSTKEY_FUNC()
291 int rc; in DBA_NEXTKEY_FUNC() local
295 rc = mdb_txn_renew(LMDB_IT(txn)); in DBA_NEXTKEY_FUNC()
296 if (rc) { in DBA_NEXTKEY_FUNC()
297 php_error_docref0(NULL, E_WARNING, "%s", mdb_strerror(rc)); in DBA_NEXTKEY_FUNC()
301 rc = mdb_cursor_get(LMDB_IT(cur), &k, &v, MDB_NEXT); in DBA_NEXTKEY_FUNC()
302 if (rc) { in DBA_NEXTKEY_FUNC()
306 if (MDB_NOTFOUND != rc) { in DBA_NEXTKEY_FUNC()
307 php_error_docref0(NULL, E_WARNING, "%s", mdb_strerror(rc)); in DBA_NEXTKEY_FUNC()
329 int rc; in DBA_SYNC_FUNC() local
331 rc = mdb_env_sync(LMDB_IT(env), 1); in DBA_SYNC_FUNC()
332 if (rc) { in DBA_SYNC_FUNC()
333 php_error_docref0(NULL, E_WARNING, "%s", mdb_strerror(rc)); in DBA_SYNC_FUNC()