function updateTest($date_time, $creative_id, $zone_id)
 {
     $this->query('SET SESSION synchronous_commit TO OFF');
     parent::updateTest($date_time, $creative_id, $zone_id);
 }
예제 #2
0
    test_update($oTest, $concurrency, $t, 'InnoDBHashPk');
    $oTest = bucketDB::factory(array('type' => 'MySQL', 'host' => 'localhost', 'user' => 'root', 'password' => '', 'dbname' => 'test_bucket', 'engine' => 'MEMORY'));
    test_update($oTest, $concurrency, $t, 'MEMORY');
    $oTest = bucketDB::factory(array('type' => 'MySQL', 'host' => 'localhost', 'user' => 'root', 'password' => 'password', 'dbname' => 'test_bucket', 'engine' => 'MEMORY', 'additionalIndexes' => ', INDEX USING BTREE (date_time)'));
    //Test using additional B-TREE index on date_time - slower than MEMORY
    //test_update($oTest, $concurrency, $t, 'MEMBTR');
    $oTest = bucketDB::factory(array('type' => 'MySQL', 'host' => 'localhost', 'user' => 'root', 'password' => 'password', 'dbname' => 'test_bucket', 'engine' => 'MEMORY', 'pkIndexType' => 'USING BTREE'));
    //Test using Primay Key as B-TREE index
    //test_update($oTest, $concurrency, $t, 'MEMPKB'); - slower than MEMORY
    $oTest = bucketDB::factory(array('type' => 'MySQL_Insertion', 'host' => 'localhost', 'user' => 'root', 'password' => 'password', 'dbname' => 'test_bucket', 'engine' => 'MEMORY'));
    test_update($oTest, $concurrency, $t, 'MEMINS');
    $oTest = bucketDB::factory(array('type' => 'PgSQL', 'port' => 5432, 'host' => 'localhost', 'user' => 'pgsql', 'password' => 'password', 'dbname' => 'test_bucket'));
    test_update($oTest, $concurrency, $t, 'PgSQL ');
    $oTest = bucketDB::factory(array('type' => 'SHM'));
    test_update($oTest, $concurrency, $t, 'SHM   ');
    $oTest = bucketDB::factory(array('type' => 'SHMSemaphore'));
    test_update($oTest, $concurrency, $t, 'SHMSEM');
}
$t->stop();
$t->display();
exit;
function test_update($oTest, $concurrency, $t, $text)
{
    $oTest->updateCreate();
    $oTest->disconnect();
    $date = '2008-05-16 16:00:00';
    for ($c = 0; $c < $concurrency; $c++) {
        mt_srand(1000 + $c);
        $pid = pcntl_fork();
        if ($pid == 0) {
            $oTest->connect();