Many files:

Merge InnoDB-.48


sql/ha_innobase.cc:
  Merge InnoDB-.48
innobase/include/dict0dict.h:
  Merge InnoDB-.48
innobase/include/dict0mem.h:
  Merge InnoDB-.48
innobase/include/mem0dbg.h:
  Merge InnoDB-.48
innobase/include/mem0mem.h:
  Merge InnoDB-.48
innobase/include/que0que.h:
  Merge InnoDB-.48
innobase/include/row0mysql.h:
  Merge InnoDB-.48
innobase/include/srv0srv.h:
  Merge InnoDB-.48
innobase/include/trx0sys.h:
  Merge InnoDB-.48
innobase/include/trx0trx.h:
  Merge InnoDB-.48
innobase/include/mem0mem.ic:
  Merge InnoDB-.48
innobase/dict/dict0dict.c:
  Merge InnoDB-.48
innobase/dict/dict0mem.c:
  Merge InnoDB-.48
innobase/log/log0recv.c:
  Merge InnoDB-.48
innobase/mem/mem0dbg.c:
  Merge InnoDB-.48
innobase/mem/mem0mem.c:
  Merge InnoDB-.48
innobase/pars/lexyy.c:
  Merge InnoDB-.48
innobase/que/que0que.c:
  Merge InnoDB-.48
innobase/rem/rem0rec.c:
  Merge InnoDB-.48
innobase/row/row0mysql.c:
  Merge InnoDB-.48
innobase/row/row0sel.c:
  Merge InnoDB-.48
innobase/srv/srv0srv.c:
  Merge InnoDB-.48
innobase/sync/sync0arr.c:
  Merge InnoDB-.48
innobase/trx/trx0sys.c:
  Merge InnoDB-.48
innobase/trx/trx0trx.c:
  Merge InnoDB-.48
innobase/trx/trx0undo.c:
  Merge InnoDB-.48
This commit is contained in:
unknown 2002-01-28 22:18:49 +02:00
commit ac540e96a9
26 changed files with 985 additions and 287 deletions

View file

@ -183,6 +183,8 @@ que_thr_create(
thr->common.type = QUE_NODE_THR;
thr->common.parent = parent;
thr->magic_n = QUE_THR_MAGIC_N;
thr->graph = parent->graph;
thr->state = QUE_THR_COMMAND_WAIT;
@ -485,7 +487,6 @@ que_graph_free_recursive(
tab_node_t* cre_tab;
ind_node_t* cre_ind;
if (node == NULL) {
return;
@ -509,6 +510,16 @@ que_graph_free_recursive(
thr = node;
if (thr->magic_n != QUE_THR_MAGIC_N) {
fprintf(stderr,
"que_thr struct appears corrupt; magic n %lu\n",
thr->magic_n);
mem_analyze_corruption((byte*)thr);
ut_a(0);
}
thr->magic_n = QUE_THR_MAGIC_FREED;
que_graph_free_recursive(thr->child);
break;
@ -606,6 +617,10 @@ que_graph_free_recursive(
break;
default:
fprintf(stderr,
"que_node struct appears corrupt; type %lu\n",
que_node_get_type(node));
mem_analyze_corruption((byte*)node);
ut_a(0);
}
}
@ -1068,20 +1083,29 @@ que_thr_stop_for_mysql(
mutex_exit(&kernel_mutex);
}
/**************************************************************************
Moves a thread from another state to the QUE_THR_RUNNING state. Increments
the n_active_thrs counters of the query graph and transaction if thr was
not active. */
void
que_thr_move_to_run_state_for_mysql(
/*================================*/
que_thr_t* thr, /* in: an query thread */
trx_t* trx) /* in: transaction */
{
if (thr->magic_n != QUE_THR_MAGIC_N) {
fprintf(stderr,
"que_thr struct appears corrupt; magic n %lu\n", thr->magic_n);
mem_analyze_corruption((byte*)thr);
ut_a(0);
}
if (!thr->is_active) {
(thr->graph)->n_active_thrs++;
thr->graph->n_active_thrs++;
trx->n_active_thrs++;
@ -1097,6 +1121,7 @@ que_thr_move_to_run_state_for_mysql(
/**************************************************************************
A patch for MySQL used to 'stop' a dummy query thread used in MySQL
select, when there is no error or lock wait. */
void
que_thr_stop_for_mysql_no_error(
/*============================*/
@ -1105,6 +1130,15 @@ que_thr_stop_for_mysql_no_error(
{
ut_ad(thr->state == QUE_THR_RUNNING);
if (thr->magic_n != QUE_THR_MAGIC_N) {
fprintf(stderr,
"que_thr struct appears corrupt; magic n %lu\n", thr->magic_n);
mem_analyze_corruption((byte*)thr);
ut_a(0);
}
thr->state = QUE_THR_COMPLETED;
thr->is_active = FALSE;