1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 09:12:14 +01:00
Files
archived-php-src/ext/dba/tests/bug78808.phpt
Christoph M. Becker c05a069adf Fix #78808: [LMDB] MDB_MAP_FULL: Environment mapsize limit reached
We implement support for a fifth parameter, which allows to specify the
mapsize.  The parameter defaults to zero, in which case the compiled in
default mapsize (usually 1048576) will be used.  The mapsize should be
a multiple of the page size of the OS.
2020-01-03 18:49:12 +01:00

26 lines
545 B
PHP

--TEST--
Bug #78808 ([LMDB] MDB_MAP_FULL: Environment mapsize limit reached)
--SKIPIF--
<?php
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
$handler = 'lmdb';
require_once __DIR__ .'/skipif.inc';
?>
--FILE--
<?php
$handler = 'lmdb';
require_once __DIR__ .'/test.inc';
$lmdb_h = dba_open($db_filename, 'c', 'lmdb', 0644, 5*1048576);
for ($i = 0; $i < 50000; $i++) {
dba_insert('key' . $i, 'value '. $i, $lmdb_h);
}
dba_close($lmdb_h);
echo "done\n";
?>
--EXPECT--
done
--CLEAN--
<?php
require_once dirname(__FILE__) .'/clean.inc';
?>