summaryrefslogtreecommitdiff
path: root/innobase/include
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/include')
-rw-r--r--innobase/include/dict0dict.h11
-rw-r--r--innobase/include/row0mysql.h21
2 files changed, 25 insertions, 7 deletions
diff --git a/innobase/include/dict0dict.h b/innobase/include/dict0dict.h
index 534c9e380b8..688685cff8b 100644
--- a/innobase/include/dict0dict.h
+++ b/innobase/include/dict0dict.h
@@ -493,6 +493,17 @@ dict_table_get_sys_col_no(
/* out: column number */
dict_table_t* table, /* in: table */
ulint sys); /* in: DATA_ROW_ID, ... */
+/************************************************************************
+Checks if a column is in the ordering columns of the clustered index of a
+table. Column prefixes are treated like whole columns. */
+
+ibool
+dict_table_col_in_clustered_key(
+/*============================*/
+ /* out: TRUE if the column, or its prefix, is
+ in the clustered key */
+ dict_table_t* table, /* in: table */
+ ulint n); /* in: column number */
/***********************************************************************
Copies types of columns contained in table to tuple. */
diff --git a/innobase/include/row0mysql.h b/innobase/include/row0mysql.h
index fade3709631..32a0c8b5d75 100644
--- a/innobase/include/row0mysql.h
+++ b/innobase/include/row0mysql.h
@@ -510,13 +510,15 @@ struct row_prebuilt_struct {
byte* ins_upd_rec_buff;/* buffer for storing data converted
to the Innobase format from the MySQL
format */
- ibool hint_no_need_to_fetch_extra_cols;
- /* normally this is TRUE, but
- MySQL will set this to FALSE
- if we might be required to fetch also
- other columns than mentioned in the
- query: the clustered index column(s),
- or an auto-increment column*/
+ ulint hint_need_to_fetch_extra_cols;
+ /* normally this is set to 0; if this
+ is set to ROW_RETRIEVE_PRIMARY_KEY,
+ then we should at least retrieve all
+ columns in the primary key; if this
+ is set to ROW_RETRIEVE_ALL_COLS, then
+ we must retrieve all columns in the
+ key (if read_just_key == 1), or all
+ columns in the table */
upd_node_t* upd_node; /* Innobase SQL update node used
to perform updates and deletes */
que_fork_t* ins_graph; /* Innobase SQL query graph used
@@ -572,6 +574,11 @@ struct row_prebuilt_struct {
#define ROW_MYSQL_DUMMY_TEMPLATE 3 /* dummy template used in
row_scan_and_check_index */
+/* Values for hint_need_to_fetch_extra_cols */
+#define ROW_RETRIEVE_PRIMARY_KEY 1
+#define ROW_RETRIEVE_ALL_COLS 2
+
+
#ifndef UNIV_NONINL
#include "row0mysql.ic"
#endif