Commit b2882fd4 authored by unknown's avatar unknown
Browse files

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
parent 137af900
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 \
+4 −18
Original line number Diff line number Diff line
@@ -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. */

innobase/include/srv0que.h

deleted100644 → 0
+0 −53
Original line number Diff line number Diff line
/******************************************************
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
+6 −15
Original line number Diff line number Diff line
@@ -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.
+9 −22
Original line number Diff line number Diff line
@@ -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
Loading