Commit a00824b5 authored by unknown's avatar unknown
Browse files

Cset exclude: marko@hundin.mysql.fi|ChangeSet|20040525171209|56870


BitKeeper/deleted/.del-srv0que.c~d1feebb77b5a9b96:
  Exclude
BitKeeper/deleted/.del-srv0que.h~f12ecb4b5afe203e:
  Exclude
innobase/include/que0que.h:
  Exclude
innobase/include/trx0roll.h:
  Exclude
innobase/include/trx0trx.h:
  Exclude
innobase/include/usr0sess.h:
  Exclude
innobase/que/que0que.c:
  Exclude
innobase/srv/Makefile.am:
  Exclude
innobase/include/Makefile.am:
  Exclude
innobase/srv/srv0srv.c:
  Exclude
innobase/trx/trx0purge.c:
  Exclude
innobase/trx/trx0roll.c:
  Exclude
innobase/trx/trx0trx.c:
  Exclude
innobase/usr/usr0sess.c:
  Exclude
parent 6a99971f
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 srv0srv.h srv0srv.ic srv0start.h \
        row0vers.ic srv0que.h 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 \
+18 −4
Original line number Diff line number Diff line
@@ -152,6 +152,17 @@ 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! */

@@ -170,15 +181,18 @@ 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. */

que_thr_t*
void
que_thr_end_wait(
/*=============*/
					/* out: next query thread to run;
					NULL if none */
	que_thr_t*	thr);		/* in: query thread in the
	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. */

+15 −6
Original line number Diff line number Diff line
@@ -91,12 +91,16 @@ trx_undo_rec_release(
/*************************************************************************
Starts a rollback operation. */	

que_thr_t*
void
trx_rollback(
/*=========*/
				/* out: next query thread to run */
	trx_t*		trx,	/* in: transaction */
	trx_sig_t*	sig);	/* in: signal starting the rollback */
	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 */
/***********************************************************************
Rollback or clean up transactions which have no user session. If the
transaction already was committed, then we clean up a possible insert
@@ -108,12 +112,17 @@ trx_rollback_or_clean_all_without_sess(void);
/********************************************************************
Finishes a transaction rollback. */

que_thr_t*
void
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 */
	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 */
/********************************************************************
Builds an undo 'query' graph for a transaction. The actual rollback is
performed by executing this query graph like a query subprocedure call.
+22 −9
Original line number Diff line number Diff line
@@ -194,10 +194,9 @@ trx_end_lock_wait(
/********************************************************************
Sends a signal to a trx object. */

que_thr_t*
ibool
trx_sig_send(
/*=========*/
					/* out: next query thread to run */
					/* out: TRUE if the signal was
					successfully delivered */
	trx_t*		trx,		/* in: trx handle */
@@ -207,17 +206,27 @@ 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. */

que_thr_t*
void
trx_sig_reply(
/*==========*/
					/* out: next query thread to run */
	trx_sig_t*	sig);		/* in: signal */
	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 */
/********************************************************************
Removes the signal object from a trx signal queue. */

@@ -229,11 +238,15 @@ trx_sig_remove(
/********************************************************************
Starts handling of a trx signal. */

que_thr_t*
void
trx_sig_start_handle(
/*=================*/
				/* out: next query thread to run, or NULL */
	trx_t*		trx);	/* in: trx 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 */
/********************************************************************
Ends signal handling. If the session is in the error state, and
trx->graph_before_signal_handling != NULL, returns control to the error
+6 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ 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
@@ -48,6 +49,11 @@ 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
Loading