summaryrefslogtreecommitdiff
path: root/include/my_base.h
diff options
context:
space:
mode:
authorunknown <ingo@mysql.com>2004-12-23 21:45:10 +0100
committerunknown <ingo@mysql.com>2004-12-23 21:45:10 +0100
commit8d11c01c595261c9c742356c0152c2152b847db9 (patch)
tree2278239c23c9cfa8abc2cfb833b598df01227ee8 /include/my_base.h
parentdd6981f4d01072cbc5fa898bd6c42b54ffbb0fcf (diff)
downloadmariadb-git-8d11c01c595261c9c742356c0152c2152b847db9.tar.gz
WL#2126 - Multi_read_range.
Added the required structures and functions for handing over multiple key ranges to the table handler. include/my_base.h: WL#2126 - Multi_read_range. Moved key range flags from sql/opt_range.h to here. Added the multi-range structure. sql/handler.cc: WL#2126 - Multi_read_range. Added the new table handler methods. sql/handler.h: WL#2126 - Multi_read_range. Added a new table flag. Added a declaration for the handler buffer. Added new elements to class handler. Added new function declarations. sql/mysqld.cc: WL#2126 - Multi_read_range. Added an option to set new system variable 'multi_range_count'. sql/opt_range.cc: WL#2126 - Multi_read_range. Added initialization for the new class members. Added initialization for the extended get_next(). Added de-initialization for the allocated buffers. Added a buffer allocation method. Added an inner loop to collect multiple ranges. Adapted range collection loops to the new initialization. sql/opt_range.h: WL#2126 - Multi_read_range. Moved key range flags from here to include/my_base.h. Added new elements to class QUICK_RANGE_SELECT. Added a copy constructor. sql/records.cc: WL#2126 - Multi_read_range. Added a call of the allocation method. sql/set_var.cc: WL#2126 - Multi_read_range. Added the new system variable 'multi_range_count'. sql/sql_class.h: WL#2126 - Multi_read_range. Added the new system variable 'multi_range_count'.
Diffstat (limited to 'include/my_base.h')
-rw-r--r--include/my_base.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/my_base.h b/include/my_base.h
index 4d043cf6b5b..d219cdd4289 100644
--- a/include/my_base.h
+++ b/include/my_base.h
@@ -370,6 +370,15 @@ enum data_file_type {
/* For key ranges */
+#define NO_MIN_RANGE 1
+#define NO_MAX_RANGE 2
+#define NEAR_MIN 4
+#define NEAR_MAX 8
+#define UNIQUE_RANGE 16
+#define EQ_RANGE 32
+#define NULL_RANGE 64
+#define GEOM_FLAG 128
+
typedef struct st_key_range
{
const byte *key;
@@ -377,6 +386,14 @@ typedef struct st_key_range
enum ha_rkey_function flag;
} key_range;
+typedef struct st_key_multi_range
+{
+ key_range start_key;
+ key_range end_key;
+ char *ptr; /* Free to use by caller (ptr to row etc) */
+ uint range_flag; /* key range flags see above */
+} KEY_MULTI_RANGE;
+
/* For number of records */
#ifdef BIG_TABLES