diff options
author | unknown <monty@donna.mysql.com> | 2001-02-17 14:19:19 +0200 |
---|---|---|
committer | unknown <monty@donna.mysql.com> | 2001-02-17 14:19:19 +0200 |
commit | 2662b59306ef0cd495fa6e2edf7129e58a11393a (patch) | |
tree | bfe39951a73e906579ab819bf5198ad8f3a64a36 /innobase/include/row0sel.ic | |
parent | 66de55a56bdcf2f7a9c0c4f8e19b3e761475e202 (diff) | |
download | mariadb-git-2662b59306ef0cd495fa6e2edf7129e58a11393a.tar.gz |
Added Innobase to source distribution
Docs/manual.texi:
Added Innobase documentation
configure.in:
Incremented version
include/my_base.h:
Added option for Innobase
myisam/mi_check.c:
cleanup
mysql-test/t/bdb.test:
cleanup
mysql-test/t/innobase.test:
Extended with new tests from bdb.test
mysql-test/t/merge.test:
Added test of SHOW create
mysys/my_init.c:
Fix for UNIXWARE 7
scripts/mysql_install_db.sh:
Always write how to start mysqld
scripts/safe_mysqld.sh:
Fixed type
sql/ha_innobase.cc:
Update to new version
sql/ha_innobase.h:
Update to new version
sql/handler.h:
Added 'update_table_comment()' and 'append_create_info()'
sql/sql_delete.cc:
Fixes for Innobase
sql/sql_select.cc:
Fixes for Innobase
sql/sql_show.cc:
Append create information (for MERGE tables)
sql/sql_update.cc:
Fixes for Innobase
Diffstat (limited to 'innobase/include/row0sel.ic')
-rw-r--r-- | innobase/include/row0sel.ic | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/innobase/include/row0sel.ic b/innobase/include/row0sel.ic new file mode 100644 index 00000000000..9005624b6ca --- /dev/null +++ b/innobase/include/row0sel.ic @@ -0,0 +1,91 @@ +/****************************************************** +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", err); + + ut_error; + que_thr_handle_error(thr, err, NULL, 0); + + return(NULL); + } + + thr->run_node = que_node_get_parent(node); + + return(thr); +} |