summaryrefslogtreecommitdiff
path: root/innobase/que
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2004-02-22 09:50:59 +0200
committerunknown <monty@mashka.mysql.fi>2004-02-22 09:50:59 +0200
commit192bf819eb2bb91e383327d3bde6f596c20a82db (patch)
treedceddcd17cf1278b50f8838476df5644f764efe9 /innobase/que
parent984750e13ef4a559c5da05b5fbd6fa363d3650b2 (diff)
parent522e83b64ab46d400ccb6aa8d7b749eefc28f4d5 (diff)
downloadmariadb-git-192bf819eb2bb91e383327d3bde6f596c20a82db.tar.gz
merge with 4.0
BitKeeper/etc/ignore: auto-union VC++Files/comp_err/comp_err.dsp: Auto merged VC++Files/my_print_defaults/my_print_defaults.dsp: Auto merged VC++Files/myisampack/myisampack.dsp: Auto merged acinclude.m4: Auto merged innobase/buf/buf0buf.c: Auto merged innobase/com/com0shm.c: Auto merged innobase/data/data0data.c: Auto merged innobase/ha/ha0ha.c: Auto merged innobase/include/buf0buf.ic: Auto merged innobase/include/dict0dict.h: Auto merged innobase/include/ibuf0ibuf.h: Auto merged innobase/include/lock0lock.h: Auto merged innobase/include/mtr0log.h: Auto merged innobase/include/mtr0mtr.h: Auto merged innobase/include/os0proc.h: Auto merged innobase/include/os0thread.h: Auto merged innobase/include/srv0srv.h: Auto merged innobase/include/sync0sync.h: Auto merged innobase/lock/lock0lock.c: Auto merged innobase/log/log0recv.c: Auto merged innobase/mem/mem0dbg.c: Auto merged innobase/mtr/mtr0mtr.c: Auto merged innobase/os/os0proc.c: Auto merged innobase/page/page0page.c: Auto merged innobase/que/que0que.c: Auto merged innobase/rem/rem0cmp.c: Auto merged innobase/row/row0ins.c: Auto merged innobase/row/row0mysql.c: Auto merged innobase/srv/srv0start.c: Auto merged innobase/sync/sync0sync.c: Auto merged innobase/trx/trx0rec.c: Auto merged innobase/trx/trx0trx.c: Auto merged innobase/ut/ut0mem.c: Auto merged innobase/ut/ut0ut.c: Auto merged libmysql/libmysql.c: Auto merged scripts/mysql_config.sh: Auto merged sql/net_serv.cc: Auto merged sql/sql_delete.cc: Auto merged sql/sql_yacc.yy: Auto merged
Diffstat (limited to 'innobase/que')
-rw-r--r--innobase/que/que0que.c147
1 files changed, 0 insertions, 147 deletions
diff --git a/innobase/que/que0que.c b/innobase/que/que0que.c
index e52afb0c9b1..40483988c12 100644
--- a/innobase/que/que0que.c
+++ b/innobase/que/que0que.c
@@ -73,37 +73,6 @@ void
que_thr_move_to_run_state(
/*======================*/
que_thr_t* thr); /* in: an query thread */
-/**************************************************************************
-Tries to parallelize query if it is not parallel enough yet. */
-static
-que_thr_t*
-que_try_parallelize(
-/*================*/
- /* out: next thread to execute */
- que_thr_t* thr); /* in: query thread */
-
-#ifdef notdefined
-/********************************************************************
-Adds info about the number of inserted rows etc. to the message to the
-client. */
-static
-void
-que_thr_add_update_info(
-/*====================*/
- que_thr_t* thr) /* in: query thread */
-{
- que_fork_t* graph;
-
- graph = thr->graph;
-
- mach_write_to_8(thr->msg_buf + SESS_SRV_MSG_N_INSERTS,
- graph->n_inserts);
- mach_write_to_8(thr->msg_buf + SESS_SRV_MSG_N_UPDATES,
- graph->n_updates);
- mach_write_to_8(thr->msg_buf + SESS_SRV_MSG_N_DELETES,
- graph->n_deletes);
-}
-#endif
/***************************************************************************
Adds a query graph to the session's list of graphs. */
@@ -711,22 +680,6 @@ que_thr_handle_error(
/* Does nothing */
}
-/**************************************************************************
-Tries to parallelize query if it is not parallel enough yet. */
-static
-que_thr_t*
-que_try_parallelize(
-/*================*/
- /* out: next thread to execute */
- que_thr_t* thr) /* in: query thread */
-{
- ut_ad(thr);
-
- /* Does nothing yet */
-
- return(thr);
-}
-
/********************************************************************
Builds a command completed-message to the client. */
static
@@ -1331,85 +1284,6 @@ que_thr_step(
return(thr);
}
-/***********************************************************************
-Checks if there is a need for a query thread switch or stopping the current
-thread. */
-
-que_thr_t*
-que_thr_check_if_switch(
-/*====================*/
- que_thr_t* thr, /* in: current query thread */
- ulint* cumul_resource) /* in: amount of resources used
- by the current call of que_run_threads
- (resources used by the OS thread!) */
-{
- que_thr_t* next_thr;
- ibool stopped;
-
- if (que_thr_peek_stop(thr)) {
-
- mutex_enter(&kernel_mutex);
-
- stopped = que_thr_stop(thr);
-
- mutex_exit(&kernel_mutex);
-
- if (stopped) {
- /* If a signal is processed, we may get a new query
- thread next_thr to run */
-
- next_thr = NULL;
-
- que_thr_dec_refer_count(thr, &next_thr);
-
- if (next_thr == NULL) {
-
- return(NULL);
- }
-
- thr = next_thr;
- }
- }
-
- if (thr->resource > QUE_PARALLELIZE_LIMIT) {
-
- /* Try parallelization of the query thread */
- thr = que_try_parallelize(thr);
-
- thr->resource = 0;
- }
-
- (*cumul_resource)++;
-
- if (*cumul_resource > QUE_ROUND_ROBIN_LIMIT) {
-
- /* It is time to round-robin query threads in the
- server task queue */
-
- if (srv_get_thread_type() == SRV_COM) {
- /* This OS thread is a SRV_COM thread: we put
- the query thread to the task queue and return
- to allow the OS thread to receive more
- messages from clients */
-
- ut_ad(thr->is_active);
-
- srv_que_task_enqueue(thr);
-
- return(NULL);
- } else {
- /* Change the query thread if there is another
- in the server task queue */
-
- thr = srv_que_round_robin(thr);
- }
-
- *cumul_resource = 0;
- }
-
- return(thr);
-}
-
/**************************************************************************
Runs query threads. Note that the individual query thread which is run
within this function may change if, e.g., the OS thread executing this
@@ -1433,27 +1307,6 @@ que_run_threads(
loop_count = QUE_MAX_LOOPS_WITHOUT_CHECK;
cumul_resource = 0;
loop:
- if (loop_count >= QUE_MAX_LOOPS_WITHOUT_CHECK) {
-
-/* In MySQL this thread switch is never needed!
-
- loop_count = 0;
-
- next_thr = que_thr_check_if_switch(thr, &cumul_resource);
-
- if (next_thr != thr) {
- if (next_thr == NULL) {
-
- return;
- }
-
- loop_count = QUE_MAX_LOOPS_WITHOUT_CHECK;
- }
-
- thr = next_thr;
-*/
- }
-
/* Check that there is enough space in the log to accommodate
possible log entries by this query step; if the operation can touch
more than about 4 pages, checks must be made also within the query