Lines Matching refs:rc
43 int rc, mode = 0644, flags = MDB_NOSUBDIR; in DBA_OPEN_FUNC() local
59 rc = mdb_env_create(&env); in DBA_OPEN_FUNC()
60 if (rc) { in DBA_OPEN_FUNC()
61 *error = mdb_strerror(rc); in DBA_OPEN_FUNC()
66 rc = mdb_env_set_mapsize(env, (size_t) mapsize); in DBA_OPEN_FUNC()
67 if (rc) { in DBA_OPEN_FUNC()
68 *error = mdb_strerror(rc); in DBA_OPEN_FUNC()
73 rc = mdb_env_open(env, info->path, flags, mode); in DBA_OPEN_FUNC()
74 if (rc) { in DBA_OPEN_FUNC()
76 *error = mdb_strerror(rc); in DBA_OPEN_FUNC()
80 rc = mdb_txn_begin(env, NULL, 0, &txn); in DBA_OPEN_FUNC()
81 if (rc) { in DBA_OPEN_FUNC()
83 *error = mdb_strerror(rc); in DBA_OPEN_FUNC()
94 rc = mdb_dbi_open(txn, NULL, 0, &LMDB_IT(dbi)); in DBA_OPEN_FUNC()
95 if (rc) { in DBA_OPEN_FUNC()
98 *error = mdb_strerror(rc); in DBA_OPEN_FUNC()
120 int rc; in DBA_FETCH_FUNC() local
125 rc = mdb_txn_renew(LMDB_IT(txn)); in DBA_FETCH_FUNC()
127 rc = mdb_txn_begin(LMDB_IT(env), NULL, MDB_RDONLY, &LMDB_IT(txn)); in DBA_FETCH_FUNC()
129 if (rc) { in DBA_FETCH_FUNC()
130 php_error_docref1(NULL, key, E_WARNING, "%s", mdb_strerror(rc)); in DBA_FETCH_FUNC()
137 rc = mdb_get(LMDB_IT(txn), LMDB_IT(dbi), &k, &v); in DBA_FETCH_FUNC()
138 if (rc) { in DBA_FETCH_FUNC()
139 if (MDB_NOTFOUND != rc) { in DBA_FETCH_FUNC()
140 php_error_docref1(NULL, key, E_WARNING, "%s", mdb_strerror(rc)); in DBA_FETCH_FUNC()
162 int rc; in DBA_UPDATE_FUNC() local
165 rc = mdb_txn_begin(LMDB_IT(env), NULL, 0, &LMDB_IT(txn)); in DBA_UPDATE_FUNC()
166 if (rc) { in DBA_UPDATE_FUNC()
167 php_error_docref2(NULL, key, val, E_WARNING, "%s", mdb_strerror(rc)); in DBA_UPDATE_FUNC()
176 rc = mdb_put(LMDB_IT(txn), LMDB_IT(dbi), &k, &v, mode == 1 ? MDB_NOOVERWRITE : 0); in DBA_UPDATE_FUNC()
177 if (rc) { in DBA_UPDATE_FUNC()
178 if (MDB_KEYEXIST != rc) { in DBA_UPDATE_FUNC()
179 php_error_docref2(NULL, key, val, E_WARNING, "%s", mdb_strerror(rc)); in DBA_UPDATE_FUNC()
185 rc = mdb_txn_commit(LMDB_IT(txn)); in DBA_UPDATE_FUNC()
186 if (rc) { in DBA_UPDATE_FUNC()
187 php_error_docref2(NULL, key, val, E_WARNING, "%s", mdb_strerror(rc)); in DBA_UPDATE_FUNC()
197 int rc; in DBA_EXISTS_FUNC() local
201 rc = mdb_txn_renew(LMDB_IT(txn)); in DBA_EXISTS_FUNC()
203 rc = mdb_txn_begin(LMDB_IT(env), NULL, MDB_RDONLY, &LMDB_IT(txn)); in DBA_EXISTS_FUNC()
205 if (rc) { in DBA_EXISTS_FUNC()
206 php_error_docref1(NULL, key, E_WARNING, "%s", mdb_strerror(rc)); in DBA_EXISTS_FUNC()
213 rc = mdb_get(LMDB_IT(txn), LMDB_IT(dbi), &k, &v); in DBA_EXISTS_FUNC()
214 if (rc) { in DBA_EXISTS_FUNC()
215 if (MDB_NOTFOUND != rc) { in DBA_EXISTS_FUNC()
216 php_error_docref1(NULL, key, E_WARNING, "%s", mdb_strerror(rc)); in DBA_EXISTS_FUNC()
233 int rc; in DBA_DELETE_FUNC() local
236 rc = mdb_txn_begin(LMDB_IT(env), NULL, 0, &LMDB_IT(txn)); in DBA_DELETE_FUNC()
237 if (rc) { in DBA_DELETE_FUNC()
238 php_error_docref1(NULL, key, E_WARNING, "%s", mdb_strerror(rc)); in DBA_DELETE_FUNC()
245 rc = mdb_del(LMDB_IT(txn), LMDB_IT(dbi), &k, NULL); in DBA_DELETE_FUNC()
246 if (!rc) { in DBA_DELETE_FUNC()
247 rc = mdb_txn_commit(LMDB_IT(txn)); in DBA_DELETE_FUNC()
248 if (rc) { in DBA_DELETE_FUNC()
249 php_error_docref1(NULL, key, E_WARNING, "%s", mdb_strerror(rc)); in DBA_DELETE_FUNC()
256 php_error_docref1(NULL, key, E_WARNING, "%s", mdb_strerror(rc)); in DBA_DELETE_FUNC()
264 int rc; in DBA_FIRSTKEY_FUNC() local
268 rc = mdb_txn_begin(LMDB_IT(env), NULL, MDB_RDONLY, &LMDB_IT(txn)); in DBA_FIRSTKEY_FUNC()
269 if (rc) { in DBA_FIRSTKEY_FUNC()
270 php_error_docref(NULL, E_WARNING, "%s", mdb_strerror(rc)); in DBA_FIRSTKEY_FUNC()
274 rc = mdb_cursor_open(LMDB_IT(txn), LMDB_IT(dbi), &LMDB_IT(cur)); in DBA_FIRSTKEY_FUNC()
275 if (rc) { in DBA_FIRSTKEY_FUNC()
277 php_error_docref(NULL, E_WARNING, "%s", mdb_strerror(rc)); in DBA_FIRSTKEY_FUNC()
281 rc = mdb_cursor_get(LMDB_IT(cur), &k, &v, MDB_FIRST); in DBA_FIRSTKEY_FUNC()
282 if (rc) { in DBA_FIRSTKEY_FUNC()
286 if (MDB_NOTFOUND != rc) { in DBA_FIRSTKEY_FUNC()
287 php_error_docref(NULL, E_WARNING, "%s", mdb_strerror(rc)); in DBA_FIRSTKEY_FUNC()
304 int rc; in DBA_NEXTKEY_FUNC() local
308 rc = mdb_txn_renew(LMDB_IT(txn)); in DBA_NEXTKEY_FUNC()
309 if (rc) { in DBA_NEXTKEY_FUNC()
310 php_error_docref(NULL, E_WARNING, "%s", mdb_strerror(rc)); in DBA_NEXTKEY_FUNC()
314 rc = mdb_cursor_get(LMDB_IT(cur), &k, &v, MDB_NEXT); in DBA_NEXTKEY_FUNC()
315 if (rc) { in DBA_NEXTKEY_FUNC()
319 if (MDB_NOTFOUND != rc) { in DBA_NEXTKEY_FUNC()
320 php_error_docref(NULL, E_WARNING, "%s", mdb_strerror(rc)); in DBA_NEXTKEY_FUNC()
342 int rc; in DBA_SYNC_FUNC() local
344 rc = mdb_env_sync(LMDB_IT(env), 1); in DBA_SYNC_FUNC()
345 if (rc) { in DBA_SYNC_FUNC()
346 php_error_docref(NULL, E_WARNING, "%s", mdb_strerror(rc)); in DBA_SYNC_FUNC()