1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-04 17:23:46 +03:00

merge with 4.0

This commit is contained in:
monty@mashka.mysql.fi
2004-02-22 09:50:59 +02:00
67 changed files with 394 additions and 3003 deletions

View File

@@ -903,80 +903,6 @@ skip_size_check:
return(DB_SUCCESS);
}
#ifdef notdefined
/*********************************************************************
This thread is used to measure contention of latches. */
static
ulint
test_measure_cont(
/*==============*/
void* arg)
{
ulint i, j;
ulint pcount, kcount, s_scount, s_xcount, s_mcount, lcount;
UT_NOT_USED(arg);
fprintf(stderr, "Starting contention measurement\n");
for (i = 0; i < 1000; i++) {
pcount = 0;
kcount = 0;
s_scount = 0;
s_xcount = 0;
s_mcount = 0;
lcount = 0;
for (j = 0; j < 100; j++) {
if (srv_measure_by_spin) {
ut_delay(ut_rnd_interval(0, 20000));
} else {
os_thread_sleep(20000);
}
if (kernel_mutex.lock_word) {
kcount++;
}
if (buf_pool->mutex.lock_word) {
pcount++;
}
if (log_sys->mutex.lock_word) {
lcount++;
}
if (btr_search_latch.reader_count) {
s_scount++;
}
if (btr_search_latch.writer != RW_LOCK_NOT_LOCKED) {
s_xcount++;
}
if (btr_search_latch.mutex.lock_word) {
s_mcount++;
}
}
fprintf(stderr,
"Mutex res. l %lu, p %lu, k %lu s x %lu s s %lu s mut %lu of %lu\n",
lcount, pcount, kcount, s_xcount, s_scount, s_mcount, j);
/* sync_print_wait_info(); */
fprintf(stderr,
"log i/o %lu n non sea %lu n succ %lu n h fail %lu\n",
log_sys->n_log_ios, btr_cur_n_non_sea,
btr_search_n_succ, btr_search_n_hash_fail);
}
return(0);
}
#endif
/********************************************************************
Starts InnoDB and creates a new database if database files
are not found and the user wants. Server parameters are