diff options
Diffstat (limited to 'sql/ha_partition.h')
-rw-r--r-- | sql/ha_partition.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/sql/ha_partition.h b/sql/ha_partition.h index c08b1f77eca..d4579d013fd 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -1,4 +1,7 @@ -/* Copyright 2005-2008 MySQL AB, 2008 Sun Microsystems, Inc. +#ifndef HA_PARTITION_INCLUDED +#define HA_PARTITION_INCLUDED + +/* Copyright 2005-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,7 +22,8 @@ enum partition_keywords { - PKW_HASH= 0, PKW_RANGE, PKW_LIST, PKW_KEY, PKW_MAXVALUE, PKW_LINEAR + PKW_HASH= 0, PKW_RANGE, PKW_LIST, PKW_KEY, PKW_MAXVALUE, PKW_LINEAR, + PKW_COLUMNS }; /* @@ -45,6 +49,7 @@ typedef struct st_ha_data_partition { ulonglong next_auto_inc_val; /**< first non reserved value */ bool auto_inc_initialized; + pthread_mutex_t mutex; } HA_DATA_PARTITION; #define PARTITION_BYTES_IN_POS 2 @@ -111,7 +116,7 @@ private: uint m_reorged_parts; // Number of reorganised parts uint m_tot_parts; // Total number of partitions; - uint m_no_locks; // For engines like ha_blackhole, which needs no locks + uint m_num_locks; // For engines like ha_blackhole, which needs no locks uint m_last_part; // Last file that we update,write,read int m_lock_type; // Remembers type of last // external_lock @@ -243,10 +248,10 @@ public: size_t pack_frm_len); virtual int drop_partitions(const char *path); virtual int rename_partitions(const char *path); - bool get_no_parts(const char *name, uint *no_parts) + bool get_no_parts(const char *name, uint *num_parts) { DBUG_ENTER("ha_partition::get_no_parts"); - *no_parts= m_tot_parts; + *num_parts= m_tot_parts; DBUG_RETURN(0); } virtual void change_table_ptr(TABLE *table_arg, TABLE_SHARE *share); @@ -1072,12 +1077,13 @@ public: virtual int backup(TD* thd, HA_CHECK_OPT *check_opt); virtual int restore(THD* thd, HA_CHECK_OPT *check_opt); - virtual int assign_to_keycache(THD* thd, HA_CHECK_OPT *check_opt); - virtual int preload_keys(THD *thd, HA_CHECK_OPT *check_opt); virtual int dump(THD* thd, int fd = -1); virtual int net_read_dump(NET* net); virtual uint checksum() const; */ + /* Enabled keycache for performance reasons, WL#4571 */ + virtual int assign_to_keycache(THD* thd, HA_CHECK_OPT *check_opt); + virtual int preload_keys(THD* thd, HA_CHECK_OPT* check_opt); /* ------------------------------------------------------------------------- @@ -1101,3 +1107,5 @@ public: virtual void append_create_info(String *packet) */ }; + +#endif /* HA_PARTITION_INCLUDED */ |