diff options
author | unknown <marko@hundin.mysql.fi> | 2004-05-25 20:12:09 +0300 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2004-05-25 20:12:09 +0300 |
commit | b2882fd4f5401fdc9a1aab57de758848e9831f2e (patch) | |
tree | ec8991c7d93cafeed85b8b602f32fb9fcf134900 /innobase/include | |
parent | 137af9003dc23bfdab76d64d114ad81dda7682ae (diff) | |
download | mariadb-git-b2882fd4f5401fdc9a1aab57de758848e9831f2e.tar.gz |
InnoDB cleanup and possible bug-fix: Remove srv0que
BitKeeper/deleted/.del-srv0que.c~d1feebb77b5a9b96:
Delete: innobase/srv/srv0que.c
innobase/srv/Makefile.am:
Remove srv0que.c
BitKeeper/deleted/.del-srv0que.h~f12ecb4b5afe203e:
Delete: innobase/include/srv0que.h
innobase/include/Makefile.am:
Remove srv0que.c
innobase/include/que0que.h:
Remove unnecessary function que_fork_error_handle()
que_thr_end_wait(): Remove output parameter next_thr; return it
innobase/include/trx0roll.h:
trx_rollback(), trx_finish_rollback_off_kernel():
Remove output parameter next_thr; return it instead
innobase/include/trx0trx.h:
trx_sig_send(), trx_sig_reply(), trx_sig_start_handle():
Remove output parameter next_thr; return it instead
innobase/include/usr0sess.h:
Remove sess->state and its literals SESS_ACTIVE and SESS_ERROR
innobase/que/que0que.c:
Remove unnecessary function que_fork_error_handle()
que_thr_end_wait(): Remove output parameter next_thr; return it
Remove references to srv0que.c
innobase/srv/srv0srv.c:
Remove unnecessary #include "srv0que.h"
innobase/trx/trx0purge.c:
Remove unneeded references to srv0que.c
innobase/trx/trx0roll.c:
Many functions: Remove output parameter next_thr; return it instead
Remove references to srv0que.c
innobase/trx/trx0trx.c:
Many functions: Remove output parameter next_thr; return it instead
Remove references to srv0que.c
Remove references to SESS_ERROR
innobase/usr/usr0sess.c:
Remove sess->state
Diffstat (limited to 'innobase/include')
-rw-r--r-- | innobase/include/Makefile.am | 2 | ||||
-rw-r--r-- | innobase/include/que0que.h | 22 | ||||
-rw-r--r-- | innobase/include/srv0que.h | 53 | ||||
-rw-r--r-- | innobase/include/trx0roll.h | 21 | ||||
-rw-r--r-- | innobase/include/trx0trx.h | 31 | ||||
-rw-r--r-- | innobase/include/usr0sess.h | 6 |
6 files changed, 20 insertions, 115 deletions
diff --git a/innobase/include/Makefile.am b/innobase/include/Makefile.am index 102d25566da..5ec70da97a2 100644 --- a/innobase/include/Makefile.am +++ b/innobase/include/Makefile.am @@ -43,7 +43,7 @@ noinst_HEADERS = btr0btr.h btr0btr.ic btr0cur.h btr0cur.ic \ row0purge.ic row0row.h row0row.ic row0sel.h row0sel.ic \ row0types.h row0uins.h row0uins.ic row0umod.h row0umod.ic \ row0undo.h row0undo.ic row0upd.h row0upd.ic row0vers.h \ - row0vers.ic srv0que.h srv0srv.h srv0srv.ic srv0start.h \ + row0vers.ic srv0srv.h srv0srv.ic srv0start.h \ sync0arr.h sync0arr.ic sync0rw.h \ sync0rw.ic sync0sync.h sync0sync.ic sync0types.h \ thr0loc.h thr0loc.ic trx0purge.h trx0purge.ic trx0rec.h \ diff --git a/innobase/include/que0que.h b/innobase/include/que0que.h index bcd7aed7e88..a438116781f 100644 --- a/innobase/include/que0que.h +++ b/innobase/include/que0que.h @@ -152,17 +152,6 @@ que_run_threads( /*============*/ que_thr_t* thr); /* in: query thread which is run initially */ /************************************************************************** -After signal handling is finished, returns control to a query graph error -handling routine. (Currently, just returns the control to the root of the -graph so that the graph can communicate an error message to the client.) */ - -void -que_fork_error_handle( -/*==================*/ - trx_t* trx, /* in: trx */ - que_t* fork); /* in: query graph which was run before signal - handling started, NULL not allowed */ -/************************************************************************** Handles an SQL error noticed during query thread execution. At the moment, does nothing! */ @@ -181,18 +170,15 @@ a single worker thread to execute it. This function should be used to end the wait state of a query thread waiting for a lock or a stored procedure completion. */ -void +que_thr_t* que_thr_end_wait( /*=============*/ - que_thr_t* thr, /* in: query thread in the + /* out: next query thread to run; + NULL if none */ + que_thr_t* thr); /* in: query thread in the QUE_THR_LOCK_WAIT, or QUE_THR_PROCEDURE_WAIT, or QUE_THR_SIG_REPLY_WAIT state */ - 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 */ /************************************************************************** Same as que_thr_end_wait, but no parameter next_thr available. */ diff --git a/innobase/include/srv0que.h b/innobase/include/srv0que.h deleted file mode 100644 index 05c339cdd32..00000000000 --- a/innobase/include/srv0que.h +++ /dev/null @@ -1,53 +0,0 @@ -/****************************************************** -Server query execution - -(c) 1996 Innobase Oy - -Created 6/5/1996 Heikki Tuuri -*******************************************************/ - - -#ifndef srv0que_h -#define srv0que_h - -#include "univ.i" -#include "que0types.h" - -/************************************************************************** -Checks if there is work to do in the server task queue. If there is, the -thread starts processing a task. Before leaving, it again checks the task -queue and picks a new task if any exists. This is called by a SRV_WORKER -thread. */ - -void -srv_que_task_queue_check(void); -/*==========================*/ -/************************************************************************** -Performs round-robin on the server tasks. This is called by a SRV_WORKER -thread every second or so. */ - -que_thr_t* -srv_que_round_robin( -/*================*/ - /* out: the new (may be == thr) query thread - to run */ - que_thr_t* thr); /* in: query thread */ -/************************************************************************** -Enqueues a task to server task queue and releases a worker thread, if -there exists one suspended. */ - -void -srv_que_task_enqueue( -/*=================*/ - que_thr_t* thr); /* in: query thread */ -/************************************************************************** -Enqueues a task to server task queue and releases a worker thread, if -there exists one suspended. */ - -void -srv_que_task_enqueue_low( -/*=====================*/ - que_thr_t* thr); /* in: query thread */ - -#endif - diff --git a/innobase/include/trx0roll.h b/innobase/include/trx0roll.h index 0d7126c9c57..e9c74dc6651 100644 --- a/innobase/include/trx0roll.h +++ b/innobase/include/trx0roll.h @@ -91,16 +91,12 @@ 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 */ + trx_sig_t* sig); /* in: signal starting the rollback */ /*********************************************************************** Rollback or clean up transactions which have no user session. If the transaction already was committed, then we clean up a possible insert @@ -112,17 +108,12 @@ trx_rollback_or_clean_all_without_sess(void); /******************************************************************** 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 */ /******************************************************************** Builds an undo 'query' graph for a transaction. The actual rollback is performed by executing this query graph like a query subprocedure call. diff --git a/innobase/include/trx0trx.h b/innobase/include/trx0trx.h index 07d5e5a8215..068333778f3 100644 --- a/innobase/include/trx0trx.h +++ b/innobase/include/trx0trx.h @@ -194,9 +194,10 @@ trx_end_lock_wait( /******************************************************************** Sends a signal to a trx object. */ -ibool +que_thr_t* trx_sig_send( /*=========*/ + /* out: next query thread to run */ /* out: TRUE if the signal was successfully delivered */ trx_t* trx, /* in: trx handle */ @@ -206,27 +207,17 @@ trx_sig_send( que_thr_t* receiver_thr, /* in: query thread which wants the reply, or NULL; if type is TRX_SIG_END_WAIT, this must be NULL */ - trx_savept_t* savept, /* in: possible rollback savepoint, or + trx_savept_t* savept); /* in: possible rollback savepoint, or NULL */ - 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 parameter - is NULL, it is ignored */ /******************************************************************** Send the reply message when a signal in the queue of the trx has been handled. */ -void +que_thr_t* trx_sig_reply( /*==========*/ - trx_sig_t* sig, /* in: signal */ - 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 */ + /* out: next query thread to run */ + trx_sig_t* sig); /* in: signal */ /******************************************************************** Removes the signal object from a trx signal queue. */ @@ -238,15 +229,11 @@ trx_sig_remove( /******************************************************************** Starts handling of a trx signal. */ -void +que_thr_t* trx_sig_start_handle( /*=================*/ - trx_t* trx, /* in: trx handle */ - 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 */ + /* out: next query thread to run, or NULL */ + trx_t* trx); /* in: trx handle */ /******************************************************************** Ends signal handling. If the session is in the error state, and trx->graph_before_signal_handling != NULL, returns control to the error diff --git a/innobase/include/usr0sess.h b/innobase/include/usr0sess.h index c7bcfb20fed..aeff7191e68 100644 --- a/innobase/include/usr0sess.h +++ b/innobase/include/usr0sess.h @@ -38,7 +38,6 @@ sess_try_close( /* The session handle. All fields are protected by the kernel mutex */ struct sess_struct{ - ulint state; /* state of the session */ trx_t* trx; /* transaction object permanently assigned for the session: the transaction instance designated by the @@ -49,11 +48,6 @@ struct sess_struct{ session */ }; -/* Session states */ -#define SESS_ACTIVE 1 -#define SESS_ERROR 2 /* session contains an error message - which has not yet been communicated - to the client */ #ifndef UNIV_NONINL #include "usr0sess.ic" #endif |