summaryrefslogtreecommitdiff
path: root/sql/table.h
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2003-08-26 00:13:22 -0700
committerunknown <igor@rurik.mysql.com>2003-08-26 00:13:22 -0700
commitf6758b47fb75fb7f39e4883d53523bfda589adfd (patch)
tree8f6c56f59666be1b54701f57e779e904575b1a4a /sql/table.h
parent3b799e8fd8eb13c7ad6e2bb01a922e37d9101ea7 (diff)
parentb9a90dffb6c429ab405d036734b3b04b98df69d6 (diff)
downloadmariadb-git-f6758b47fb75fb7f39e4883d53523bfda589adfd.tar.gz
Manual merge
include/my_base.h: Auto merged include/my_global.h: Auto merged include/my_sys.h: Auto merged myisam/mi_check.c: Auto merged myisam/mi_extra.c: Auto merged myisam/mi_locking.c: Auto merged myisam/myisamchk.c: Auto merged myisam/myisamdef.h: Auto merged mysql-test/r/key_cache.result: Auto merged mysql-test/t/key_cache.test: Auto merged sql/ha_myisam.cc: Auto merged sql/handler.cc: Auto merged sql/handler.h: Auto merged sql/item_cmpfunc.h: Auto merged sql/mysql_priv.h: Auto merged sql/opt_range.cc: Auto merged sql/set_var.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_table.cc: Auto merged sql/table.h: Auto merged
Diffstat (limited to 'sql/table.h')
-rw-r--r--sql/table.h34
1 files changed, 32 insertions, 2 deletions
diff --git a/sql/table.h b/sql/table.h
index 7b4e5745732..b9c6a72bb09 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -55,6 +55,31 @@ typedef struct st_filesort_info
ha_rows found_records; /* How many records in sort */
} FILESORT_INFO;
+
+/* Table key cache assignment descriptor */
+/*
+ In future the similar structure is to be used for
+ an assignment of an index to a key cache: the index name will be added.
+ The name of the database catalog will be added as well.
+ The descriptors for the current assignments are put in the
+ assignment cache: assign_cache. If a table is not found in the cache
+ it is considered assigned to the default key cache.
+*/
+typedef struct st_key_cache_asmt
+{
+ char *db_name; /* db the table belongs to */
+ char *table_name; /* the name of the table */
+ char *table_key; /* key for the assignment cache */
+ uint key_length; /* the length of this key */
+ struct st_key_cache_var *key_cache; /* reference to the key cache */
+ struct st_key_cache_asmt **prev; /* links in the chain all assignments */
+ struct st_key_cache_asmt *next; /* to this cache */
+ struct st_my_thread_var *queue; /* queue of requests for assignment */
+ uint requests; /* number of current requests */
+ bool to_reassign; /* marked when reassigning all cache */
+ bool triggered; /* marked when assignment is triggered*/
+} KEY_CACHE_ASMT;
+
/* Table cache entry struct */
class Field_timestamp;
@@ -62,11 +87,13 @@ class Field_blob;
struct st_table {
handler *file;
- Field **field; /* Pointer to fields */
+ KEY_CACHE_VAR *key_cache; /* Ref to the key cache the table assigned to*/
+ KEY_CACHE_ASMT *key_cache_asmt;/* Only when opened for key cache assignment */
+ Field **field; /* Pointer to fields */
Field_blob **blob_field; /* Pointer to blob fields */
HASH name_hash; /* hash of field names */
byte *record[2]; /* Pointer to records */
- byte *default_values; /* record with default values for INSERT */
+ byte *default_values; /* Record with default values for INSERT */
byte *insert_values; /* used by INSERT ... UPDATE */
uint fields; /* field count */
uint reclength; /* Recordlength */
@@ -161,6 +188,7 @@ typedef struct st_table_list
{
struct st_table_list *next;
char *db, *alias, *real_name;
+ char *option; /* Used by cache index */
Item *on_expr; /* Used with outer join */
struct st_table_list *natural_join; /* natural join on this table*/
/* ... join ... USE INDEX ... IGNORE INDEX */
@@ -192,3 +220,5 @@ typedef struct st_open_table_list
char *db,*table;
uint32 in_use,locked;
} OPEN_TABLE_LIST;
+
+