mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 19:11:46 +01:00
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into mysql.com:/home/jonas/src/mysql-5.0-ndb
This commit is contained in:
commit
5af87424fd
2 changed files with 29 additions and 21 deletions
|
@ -85,7 +85,7 @@ FastScheduler::activateSendPacked()
|
|||
void
|
||||
FastScheduler::doJob()
|
||||
{
|
||||
Uint32 init_loopCount = 0;
|
||||
Uint32 loopCount = 0;
|
||||
Uint32 TminLoops = getBOccupancy() + EXTRA_SIGNALS_PER_DO_JOB;
|
||||
Uint32 TloopMax = (Uint32)globalData.loopMax;
|
||||
if (TminLoops < TloopMax) {
|
||||
|
@ -94,10 +94,9 @@ FastScheduler::doJob()
|
|||
if (TloopMax < MIN_NUMBER_OF_SIG_PER_DO_JOB) {
|
||||
TloopMax = MIN_NUMBER_OF_SIG_PER_DO_JOB;
|
||||
}//if
|
||||
register Signal* signal = getVMSignals();
|
||||
register Uint32 tHighPrio= globalData.highestAvailablePrio;
|
||||
do{
|
||||
Uint32 loopCount = init_loopCount;
|
||||
register Uint32 tHighPrio = globalData.highestAvailablePrio;
|
||||
register Signal* signal = getVMSignals();
|
||||
while ((tHighPrio < LEVEL_IDLE) && (loopCount < TloopMax)) {
|
||||
// signal->garbage_register();
|
||||
// To ensure we find bugs quickly
|
||||
|
@ -155,24 +154,27 @@ FastScheduler::doJob()
|
|||
}//if
|
||||
loopCount++;
|
||||
}//while
|
||||
if (globalData.sendPackedActivated == 1) {
|
||||
Uint32 t1 = theDoJobTotalCounter;
|
||||
Uint32 t2 = theDoJobCallCounter;
|
||||
t1 += (loopCount - init_loopCount);
|
||||
t2++;
|
||||
theDoJobTotalCounter = t1;
|
||||
theDoJobCallCounter = t2;
|
||||
if (t2 == 8192) {
|
||||
reportDoJobStatistics(t1 >> 13);
|
||||
theDoJobCallCounter = 0;
|
||||
theDoJobTotalCounter = 0;
|
||||
}//if
|
||||
}//if
|
||||
init_loopCount = loopCount;
|
||||
sendPacked();
|
||||
tHighPrio = globalData.highestAvailablePrio;
|
||||
if(getBOccupancy() > MAX_OCCUPANCY)
|
||||
{
|
||||
if(loopCount != TloopMax)
|
||||
abort();
|
||||
assert( loopCount == TloopMax );
|
||||
TloopMax += 512;
|
||||
}
|
||||
} while ((getBOccupancy() > MAX_OCCUPANCY) ||
|
||||
((init_loopCount < TloopMax) &&
|
||||
(globalData.highestAvailablePrio < LEVEL_IDLE)));
|
||||
((loopCount < TloopMax) &&
|
||||
(tHighPrio < LEVEL_IDLE)));
|
||||
|
||||
theDoJobCallCounter ++;
|
||||
theDoJobTotalCounter += loopCount;
|
||||
if (theDoJobCallCounter == 8192) {
|
||||
reportDoJobStatistics(theDoJobTotalCounter >> 13);
|
||||
theDoJobCallCounter = 0;
|
||||
theDoJobTotalCounter = 0;
|
||||
}//if
|
||||
|
||||
}//FastScheduler::doJob()
|
||||
|
||||
void FastScheduler::sendPacked()
|
||||
|
|
|
@ -1310,7 +1310,7 @@ enum enum_mysql_completiontype {
|
|||
SAVEPOINT_NAME_ROLLBACK=2,
|
||||
SAVEPOINT_NAME_RELEASE=4,
|
||||
COMMIT_AND_CHAIN=6,
|
||||
ROLLBACK_AND_CHAIN=7,
|
||||
ROLLBACK_AND_CHAIN=7
|
||||
};
|
||||
|
||||
int mysql_endtrans(THD *thd, enum enum_mysql_completiontype completion,
|
||||
|
@ -2234,7 +2234,9 @@ mysql_execute_command(THD *thd)
|
|||
/* Locked closure of all tables */
|
||||
TABLE_LIST *locked_tables= NULL;
|
||||
/* Saved variable value */
|
||||
#ifdef HAVE_INNOBASE_DB
|
||||
my_bool old_innodb_table_locks= thd->variables.innodb_table_locks;
|
||||
#endif
|
||||
DBUG_ENTER("mysql_execute_command");
|
||||
|
||||
/*
|
||||
|
@ -2330,7 +2332,9 @@ mysql_execute_command(THD *thd)
|
|||
{
|
||||
if ((locked_tables= sp_hash_to_table_list(thd, &lex->sptabs)))
|
||||
{
|
||||
#ifdef HAVE_INNOBASE_DB
|
||||
thd->variables.innodb_table_locks= FALSE;
|
||||
#endif
|
||||
sp_open_and_lock_tables(thd, locked_tables);
|
||||
}
|
||||
}
|
||||
|
@ -4346,7 +4350,9 @@ cleanup:
|
|||
|
||||
if (locked_tables)
|
||||
{
|
||||
#ifdef HAVE_INNOBASE_DB
|
||||
thd->variables.innodb_table_locks= old_innodb_table_locks;
|
||||
#endif
|
||||
if (thd->locked_tables)
|
||||
sp_unlock_tables(thd);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue