diff options
author | unknown <monty@mysql.com> | 2004-05-25 22:54:00 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-05-25 22:54:00 +0300 |
commit | a9b481d3cd7fbf832b17523c521185db6366492c (patch) | |
tree | b258dbd41e0b45f70adf8c42ee94cce74cd0232f /innobase/trx/trx0roll.c | |
parent | de5edbf8db66e1f896b76d408152cd0094dcf684 (diff) | |
parent | a3d0ce6bc611673e2d5342bc9cd735a9febfe6b4 (diff) | |
download | mariadb-git-a9b481d3cd7fbf832b17523c521185db6366492c.tar.gz |
merge with 4.0 to get Netware patches and fixes for libmysqld.dll
configure.in:
Auto merged
Build-tools/Do-compile:
Auto merged
client/mysql.cc:
Auto merged
client/mysqladmin.c:
Auto merged
client/mysqlcheck.c:
Auto merged
client/mysqldump.c:
Auto merged
client/mysqlimport.c:
Auto merged
client/mysqlshow.c:
Auto merged
client/mysqltest.c:
Auto merged
include/my_global.h:
Auto merged
include/thr_alarm.h:
Auto merged
innobase/include/trx0roll.h:
Auto merged
innobase/include/trx0trx.h:
Auto merged
innobase/que/que0que.c:
Auto merged
innobase/srv/srv0srv.c:
Auto merged
innobase/trx/trx0purge.c:
Auto merged
innobase/trx/trx0roll.c:
Auto merged
innobase/trx/trx0trx.c:
Auto merged
innobase/usr/usr0sess.c:
Auto merged
isam/isamchk.c:
Auto merged
myisam/myisam_ftdump.c:
Auto merged
myisam/myisamchk.c:
Auto merged
myisam/myisampack.c:
Auto merged
mysys/default.c:
Auto merged
mysys/my_getopt.c:
Auto merged
mysys/my_init.c:
Auto merged
mysys/my_pthread.c:
Auto merged
netware/Makefile.am:
Auto merged
netware/init_db.sql:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
tools/mysqlmanager.c:
Auto merged
VC++Files/dbug/dbug.dsp:
Auto merged
VC++Files/heap/heap.dsp:
Auto merged
VC++Files/isam/isam.dsp:
Auto merged
VC++Files/libmysql/libmysql.dsp:
Auto merged
VC++Files/myisam/myisam.dsp:
Auto merged
VC++Files/myisammrg/myisammrg.dsp:
Auto merged
VC++Files/mysys/mysys.dsp:
Auto merged
VC++Files/libmysqld/libmysqld.dsp:
merge
client/mysqlbinlog.cc:
merge
extra/perror.c:
merge
include/mysql_com.h:
merge
libmysqld/Makefile.am:
merge
netware/BUILD/mwenv:
merge
sql/mysqld.cc:
merge
Diffstat (limited to 'innobase/trx/trx0roll.c')
-rw-r--r-- | innobase/trx/trx0roll.c | 77 |
1 files changed, 24 insertions, 53 deletions
diff --git a/innobase/trx/trx0roll.c b/innobase/trx/trx0roll.c index e2e4f24b82e..4343249764e 100644 --- a/innobase/trx/trx0roll.c +++ b/innobase/trx/trx0roll.c @@ -20,7 +20,6 @@ Created 3/26/1996 Heikki Tuuri #include "trx0rec.h" #include "que0que.h" #include "usr0sess.h" -#include "srv0que.h" #include "srv0start.h" #include "row0undo.h" #include "row0mysql.h" @@ -932,21 +931,15 @@ trx_undo_rec_release( /************************************************************************* Starts a rollback operation. */ -void +que_thr_t* trx_rollback( /*=========*/ + /* out: next query thread to run */ trx_t* trx, /* in: transaction */ - trx_sig_t* sig, /* in: signal starting the rollback */ - que_thr_t** next_thr)/* in/out: next query thread to run; - if the value which is passed in is - a pointer to a NULL pointer, then the - calling function can start running - a new query thread; if the passed value is - NULL, the parameter is ignored */ + trx_sig_t* sig) /* in: signal starting the rollback */ { que_t* roll_graph; que_thr_t* thr; -/* que_thr_t* thr2; */ #ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); @@ -988,18 +981,7 @@ trx_rollback( thr = que_fork_start_command(roll_graph); ut_ad(thr); - -/* thr2 = que_fork_start_command(roll_graph); - - ut_ad(thr2); */ - - if (next_thr && (*next_thr == NULL)) { - *next_thr = thr; -/* srv_que_task_enqueue_low(thr2); */ - } else { - srv_que_task_enqueue_low(thr); -/* srv_que_task_enqueue_low(thr2); */ - } + return(thr); } /******************************************************************** @@ -1071,17 +1053,14 @@ trx_finish_error_processing( /************************************************************************* Finishes a partial rollback operation. */ static -void +que_thr_t* trx_finish_partial_rollback_off_kernel( /*===================================*/ - trx_t* trx, /* in: transaction */ - que_thr_t** next_thr)/* in/out: next query thread to run; - if the value which is passed in is a pointer - to a NULL pointer, then the calling function - can start running a new query thread; if this - parameter is NULL, it is ignored */ + /* out: next query thread to run */ + trx_t* trx) /* in: transaction */ { trx_sig_t* sig; + que_thr_t* next_thr; #ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); @@ -1092,29 +1071,26 @@ trx_finish_partial_rollback_off_kernel( /* Remove the signal from the signal queue and send reply message to it */ - trx_sig_reply(sig, next_thr); + next_thr = trx_sig_reply(sig); trx_sig_remove(trx, sig); trx->que_state = TRX_QUE_RUNNING; + return(next_thr); } /******************************************************************** Finishes a transaction rollback. */ -void +que_thr_t* trx_finish_rollback_off_kernel( /*===========================*/ + /* out: next query thread to run */ que_t* graph, /* in: undo graph which can now be freed */ - trx_t* trx, /* in: transaction */ - que_thr_t** next_thr)/* in/out: next query thread to run; - if the value which is passed in is - a pointer to a NULL pointer, then the - calling function can start running - a new query thread; if this parameter is - NULL, it is ignored */ + trx_t* trx) /* in: transaction */ { trx_sig_t* sig; trx_sig_t* next_sig; + que_thr_t* next_thr; #ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); @@ -1129,15 +1105,13 @@ trx_finish_rollback_off_kernel( if (sig->type == TRX_SIG_ROLLBACK_TO_SAVEPT) { - trx_finish_partial_rollback_off_kernel(trx, next_thr); - - return; + return(trx_finish_partial_rollback_off_kernel(trx)); } else if (sig->type == TRX_SIG_ERROR_OCCURRED) { trx_finish_error_processing(trx); - return; + return(NULL); } #ifdef UNIV_DEBUG @@ -1153,19 +1127,23 @@ trx_finish_rollback_off_kernel( send reply messages to them */ trx->que_state = TRX_QUE_RUNNING; - + + next_thr = NULL; while (sig != NULL) { next_sig = UT_LIST_GET_NEXT(signals, sig); if (sig->type == TRX_SIG_TOTAL_ROLLBACK) { - trx_sig_reply(sig, next_thr); + ut_a(next_thr == NULL); + next_thr = trx_sig_reply(sig); trx_sig_remove(trx, sig); } sig = next_sig; } + + return(next_thr); } /************************************************************************* @@ -1198,7 +1176,6 @@ trx_rollback_step( que_thr_t* thr) /* in: query thread */ { roll_node_t* node; - ibool success; ulint sig_no; trx_savept_t* savept; @@ -1225,19 +1202,13 @@ trx_rollback_step( /* Send a rollback signal to the transaction */ - success = trx_sig_send(thr_get_trx(thr), - sig_no, TRX_SIG_SELF, - thr, savept, NULL); + trx_sig_send(thr_get_trx(thr), sig_no, TRX_SIG_SELF, + thr, savept); thr->state = QUE_THR_SIG_REPLY_WAIT; mutex_exit(&kernel_mutex); - if (!success) { - /* Error in delivering the rollback signal */ - que_thr_handle_error(thr, DB_ERROR, NULL, 0); - } - return(NULL); } |