mirror of
https://github.com/MariaDB/server.git
synced 2025-03-02 17:23:16 +01:00

Added option --max-record-length=# to myisamchk Don't try repair twice if doing myisamchk --repair --force Shared memory handler didn't clean up things on errors or shutdown VC++Files/libmysqltest/mytest.c: Fixed compiler warnings from Intel compiler include/myisam.h: Added option --max-record-length=# to myisamchk include/mysql_com.h: Fixed compiler warnings from Intel compiler innobase/btr/btr0btr.c: Fixed compiler warnings from Intel compiler innobase/btr/btr0cur.c: Fixed compiler warnings from Intel compiler innobase/include/btr0btr.ic: Fixed compiler warnings from Intel compiler innobase/include/buf0buf.ic: Fixed compiler warnings from Intel compiler innobase/include/row0sel.ic: Fixed compiler warnings from Intel compiler innobase/include/row0upd.ic: Fixed compiler warnings from Intel compiler innobase/include/trx0rseg.ic: Fixed compiler warnings from Intel compiler innobase/pars/pars0opt.c: Fixed compiler warnings from Intel compiler innobase/que/que0que.c: Fixed compiler warnings from Intel compiler myisam/mi_check.c: Added option --max-record-length=# to myisamchk Better error messages myisam/myisamchk.c: Added option --max-record-length=# to myisamchk Don't try repair twice if doing myisamchk --repair --force mysql-test/r/create.result: Updated test results mysql-test/t/create.test: Better initialization sql/ha_innodb.cc: Fixed compiler warnings from Intel compiler sql/item_func.cc: Fixed compiler warnings from Intel compiler sql/mysqld.cc: Fixed compiler warnings from Intel compiler Cleaned up handle_connections_shared_memory Shared memory handler didn't clean up things on errors or shutdown strings/bmove512.c: Fixed compiler warnings from Intel compiler
91 lines
2 KiB
Text
91 lines
2 KiB
Text
/******************************************************
|
|
Select
|
|
|
|
(c) 1997 Innobase Oy
|
|
|
|
Created 12/19/1997 Heikki Tuuri
|
|
*******************************************************/
|
|
|
|
#include "que0que.h"
|
|
|
|
/*************************************************************************
|
|
Gets the plan node for the nth table in a join. */
|
|
UNIV_INLINE
|
|
plan_t*
|
|
sel_node_get_nth_plan(
|
|
/*==================*/
|
|
/* out: plan node */
|
|
sel_node_t* node, /* in: select node */
|
|
ulint i) /* in: get ith plan node */
|
|
{
|
|
ut_ad(i < node->n_tables);
|
|
|
|
return(node->plans + i);
|
|
}
|
|
|
|
/*************************************************************************
|
|
Resets the cursor defined by sel_node to the SEL_NODE_OPEN state, which means
|
|
that it will start fetching from the start of the result set again, regardless
|
|
of where it was before, and it will set intention locks on the tables. */
|
|
UNIV_INLINE
|
|
void
|
|
sel_node_reset_cursor(
|
|
/*==================*/
|
|
sel_node_t* node) /* in: select node */
|
|
{
|
|
node->state = SEL_NODE_OPEN;
|
|
}
|
|
|
|
/**************************************************************************
|
|
Performs an execution step of an open or close cursor statement node. */
|
|
UNIV_INLINE
|
|
que_thr_t*
|
|
open_step(
|
|
/*======*/
|
|
/* out: query thread to run next or NULL */
|
|
que_thr_t* thr) /* in: query thread */
|
|
{
|
|
sel_node_t* sel_node;
|
|
open_node_t* node;
|
|
ulint err;
|
|
|
|
ut_ad(thr);
|
|
|
|
node = thr->run_node;
|
|
ut_ad(que_node_get_type(node) == QUE_NODE_OPEN);
|
|
|
|
sel_node = node->cursor_def;
|
|
|
|
err = DB_SUCCESS;
|
|
|
|
if (node->op_type == ROW_SEL_OPEN_CURSOR) {
|
|
|
|
/* if (sel_node->state == SEL_NODE_CLOSED) { */
|
|
|
|
sel_node_reset_cursor(sel_node);
|
|
/* } else {
|
|
err = DB_ERROR;
|
|
} */
|
|
} else {
|
|
if (sel_node->state != SEL_NODE_CLOSED) {
|
|
|
|
sel_node->state = SEL_NODE_CLOSED;
|
|
} else {
|
|
err = DB_ERROR;
|
|
}
|
|
}
|
|
|
|
if (err != DB_SUCCESS) {
|
|
/* SQL error detected */
|
|
printf("SQL error %lu\n", (unsigned long) err);
|
|
|
|
ut_error;
|
|
que_thr_handle_error(thr, err, NULL, 0);
|
|
|
|
return(NULL);
|
|
}
|
|
|
|
thr->run_node = que_node_get_parent(node);
|
|
|
|
return(thr);
|
|
}
|