Below is the list of changes that have just been committed into a local
5.1 repository of grog. When grog does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2161 06/06/08 14:01:09 grog@stripped +1 -0
handler.h:
White space cleanup.
sql/handler.h
1.210 06/06/08 14:00:35 grog@stripped +74 -74
White space cleanup.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: grog
# Host: eucla.lemis.com
# Root: /home/MySQL/5.1-Online-Backup
--- 1.209/sql/handler.h 2006-05-13 01:20:27 +09:30
+++ 1.210/sql/handler.h 2006-06-08 14:00:35 +09:30
@@ -18,24 +18,24 @@
/* Definitions for parameters to do with handler-routines */
#ifdef USE_PRAGMA_INTERFACE
-#pragma interface /* gcc class implementation */
+#pragma interface /* gcc class implementation */
#endif
#include <ft_global.h>
#include <keycache.h>
#ifndef NO_HASH
-#define NO_HASH /* Not yet implemented */
+#define NO_HASH /* Not yet implemented */
#endif
#define USING_TRANSACTIONS
// the following is for checking tables
-#define HA_ADMIN_ALREADY_DONE 1
+#define HA_ADMIN_ALREADY_DONE 1
#define HA_ADMIN_OK 0
#define HA_ADMIN_NOT_IMPLEMENTED -1
-#define HA_ADMIN_FAILED -2
+#define HA_ADMIN_FAILED -2
#define HA_ADMIN_CORRUPT -3
#define HA_ADMIN_INTERNAL_ERROR -4
#define HA_ADMIN_INVALID -5
@@ -82,8 +82,8 @@
do this: the position of an arbitrary record can be retrieved using
position() when the table has a primary key, effectively allowing random
access on the table based on a given record.
-*/
-#define HA_PRIMARY_KEY_ALLOW_RANDOM_ACCESS (1 << 16)
+*/
+#define HA_PRIMARY_KEY_ALLOW_RANDOM_ACCESS (1 << 16)
#define HA_CAN_RTREEKEYS (1 << 17)
#define HA_NOT_DELETE_WITH_CACHE (1 << 18)
#define HA_NO_PREFIX_CHAR_KEYS (1 << 20)
@@ -92,8 +92,8 @@
#define HA_NO_AUTO_INCREMENT (1 << 23)
#define HA_HAS_CHECKSUM (1 << 24)
/* Table data are stored in separate files (for lower_case_table_names) */
-#define HA_FILE_BASED (1 << 26)
-#define HA_NO_VARCHAR (1 << 27)
+#define HA_FILE_BASED (1 << 26)
+#define HA_NO_VARCHAR (1 << 27)
#define HA_CAN_BIT_FIELD (1 << 28) /* supports bit fields */
#define HA_NEED_READ_RANGE_BUFFER (1 << 29) /* for read_multi_range */
#define HA_ANY_INDEX_MAY_BE_UNIQUE (1 << 30)
@@ -104,8 +104,8 @@
#define HA_READ_PREV 2 /* supports ::index_prev */
#define HA_READ_ORDER 4 /* index_next/prev follow sort order */
#define HA_READ_RANGE 8 /* can find all records in a range */
-#define HA_ONLY_WHOLE_INDEX 16 /* Can't use part key searches */
-#define HA_KEYREAD_ONLY 64 /* Support HA_EXTRA_KEYREAD */
+#define HA_ONLY_WHOLE_INDEX 16 /* Can't use part key searches */
+#define HA_KEYREAD_ONLY 64 /* Support HA_EXTRA_KEYREAD */
/*
bits in alter_table_flags:
@@ -164,7 +164,7 @@
Index scan will not return records in rowid order. Not guaranteed to be
set for unordered (e.g. HASH) indexes.
*/
-#define HA_KEY_SCAN_NOT_ROR 128
+#define HA_KEY_SCAN_NOT_ROR 128
/* operations for disable/enable indexes */
#define HA_KEY_SWITCH_NONUNIQ 0
@@ -185,32 +185,32 @@
HA_GET_INFO does an implicit HA_ABORT_IF_LOCKED
*/
-#define HA_OPEN_KEYFILE 1
-#define HA_OPEN_RNDFILE 2
-#define HA_GET_INDEX 4
-#define HA_GET_INFO 8 /* do a ha_info() after open */
-#define HA_READ_ONLY 16 /* File opened as readonly */
+#define HA_OPEN_KEYFILE 1
+#define HA_OPEN_RNDFILE 2
+#define HA_GET_INDEX 4
+#define HA_GET_INFO 8 /* do a ha_info() after open */
+#define HA_READ_ONLY 16 /* File opened as readonly */
/* Try readonly if can't open with read and write */
-#define HA_TRY_READ_ONLY 32
-#define HA_WAIT_IF_LOCKED 64 /* Wait if locked on open */
-#define HA_ABORT_IF_LOCKED 128 /* skip if locked on open.*/
-#define HA_BLOCK_LOCK 256 /* unlock when reading some records */
-#define HA_OPEN_TEMPORARY 512
-
- /* Errors on write which is recoverable (Key exist) */
-#define HA_WRITE_SKIP 121 /* Duplicate key on write */
-#define HA_READ_CHECK 123 /* Update with is recoverable */
-#define HA_CANT_DO_THAT 131 /* Databasehandler can't do it */
-
- /* Some key definitions */
-#define HA_KEY_NULL_LENGTH 1
-#define HA_KEY_BLOB_LENGTH 2
+#define HA_TRY_READ_ONLY 32
+#define HA_WAIT_IF_LOCKED 64 /* Wait if locked on open */
+#define HA_ABORT_IF_LOCKED 128 /* skip if locked on open.*/
+#define HA_BLOCK_LOCK 256 /* unlock when reading some records */
+#define HA_OPEN_TEMPORARY 512
+
+ /* Errors on write which is recoverable (Key exist) */
+#define HA_WRITE_SKIP 121 /* Duplicate key on write */
+#define HA_READ_CHECK 123 /* Update with is recoverable */
+#define HA_CANT_DO_THAT 131 /* Databasehandler can't do it */
+
+ /* Some key definitions */
+#define HA_KEY_NULL_LENGTH 1
+#define HA_KEY_BLOB_LENGTH 2
-#define HA_LEX_CREATE_TMP_TABLE 1
+#define HA_LEX_CREATE_TMP_TABLE 1
#define HA_LEX_CREATE_IF_NOT_EXISTS 2
-#define HA_OPTION_NO_CHECKSUM (1L << 17)
+#define HA_OPTION_NO_CHECKSUM (1L << 17)
#define HA_OPTION_NO_DELAY_KEY_WRITE (1L << 18)
-#define HA_MAX_REC_LENGTH 65535
+#define HA_MAX_REC_LENGTH 65535
/* Table caching type */
#define HA_CACHE_TBL_NONTRANSACT 0
@@ -239,8 +239,8 @@
};
enum row_type { ROW_TYPE_NOT_USED=-1, ROW_TYPE_DEFAULT, ROW_TYPE_FIXED,
- ROW_TYPE_DYNAMIC, ROW_TYPE_COMPRESSED,
- ROW_TYPE_REDUNDANT, ROW_TYPE_COMPACT };
+ ROW_TYPE_DYNAMIC, ROW_TYPE_COMPRESSED,
+ ROW_TYPE_REDUNDANT, ROW_TYPE_COMPACT };
enum enum_binlog_func {
BFN_RESET_LOGS= 1,
@@ -303,7 +303,7 @@
long bqual_length;
char data[XIDDATASIZE]; // not \0-terminated !
- xid_t() {} /* Remove gcc warning */
+ xid_t() {} /* Remove gcc warning */
bool eq(struct xid_t *xid)
{ return eq(xid->gtrid_length, xid->bqual_length, xid->data); }
bool eq(long g, long b, const char *d)
@@ -488,7 +488,7 @@
const char *name;
/*
- Historical marker for if the engine is available of not
+ Historical marker for if the engine is available of not
*/
SHOW_COMP_OPTION state;
@@ -502,7 +502,7 @@
This is going away and new engines will just use "name" for this.
*/
enum legacy_db_type db_type;
- /*
+ /*
Method that initizlizes a storage engine
*/
bool (*init)();
@@ -616,7 +616,7 @@
} THD_TRANS;
enum enum_tx_isolation { ISO_READ_UNCOMMITTED, ISO_READ_COMMITTED,
- ISO_REPEATABLE_READ, ISO_SERIALIZABLE};
+ ISO_REPEATABLE_READ, ISO_SERIALIZABLE};
enum ndb_distribution { ND_KEYHASH= 0, ND_LINHASH= 1 };
@@ -662,10 +662,10 @@
handlerton *db_type;
enum row_type row_type;
uint null_bits; /* NULL bits at start of record */
- uint options; /* OR of HA_CREATE_ options */
+ uint options; /* OR of HA_CREATE_ options */
uint merge_insert_method;
uint extra_size; /* length of extra data segment */
- bool table_existed; /* 1 in create if table existed */
+ bool table_existed; /* 1 in create if table existed */
bool frm_only; /* 1 if no ha_create_table() */
bool varchar; /* 1 if table has a VARCHAR */
bool store_on_disk; /* 1 if table stored on disk */
@@ -725,7 +725,7 @@
ulong sort_buffer_size;
uint flags; /* isam layer flags (e.g. for myisamchk) */
uint sql_flags; /* sql layer flags - for something myisamchk cannot do */
- KEY_CACHE *key_cache; /* new key cache when changing key cache */
+ KEY_CACHE *key_cache; /* new key cache when changing key cache */
void init();
} HA_CHECK_OPT;
@@ -779,18 +779,18 @@
virtual int reset() { return extra(HA_EXTRA_RESET); }
public:
const handlerton *ht; /* storage engine of this handler */
- byte *ref; /* Pointer to current row */
- byte *dupp_ref; /* Pointer to dupp row */
- ulonglong data_file_length; /* Length off data file */
- ulonglong max_data_file_length; /* Length off data file */
+ byte *ref; /* Pointer to current row */
+ byte *dupp_ref; /* Pointer to dupp row */
+ ulonglong data_file_length; /* Length off data file */
+ ulonglong max_data_file_length; /* Length off data file */
ulonglong index_file_length;
ulonglong max_index_file_length;
- ulonglong delete_length; /* Free bytes */
+ ulonglong delete_length; /* Free bytes */
ulonglong auto_increment_value;
- ha_rows records; /* Records in table */
- ha_rows deleted; /* Deleted records */
- ulong mean_rec_length; /* physical reclength */
- time_t create_time; /* When table was created */
+ ha_rows records; /* Records in table */
+ ha_rows deleted; /* Deleted records */
+ ulong mean_rec_length; /* physical reclength */
+ time_t create_time; /* When table was created */
time_t check_time;
time_t update_time;
@@ -806,12 +806,12 @@
int key_compare_result_on_equal;
bool eq_range;
- uint errkey; /* Last dup key */
+ uint errkey; /* Last dup key */
uint sortkey, key_used_on_scan;
uint active_index;
/* Length of ref (1-8 or the clustered key length) */
uint ref_length;
- uint block_size; /* index block size */
+ uint block_size; /* index block size */
FT_INFO *ft_handler;
enum {NONE=0, INDEX, RND} inited;
bool auto_increment_column_changed;
@@ -880,7 +880,7 @@
virtual const key_map *keys_to_use_for_scanning() { return &key_map_empty; }
virtual bool has_transactions(){ return 0;}
virtual uint extra_rec_buf_length() const { return 0; }
-
+
/*
Return upper bound of current number of records in the table
(max. of how many records one will retrieve when doing a full table scan)
@@ -932,7 +932,7 @@
ha_clear_all_set();
DBUG_RETURN(reset());
}
-
+
/* this is necessary in many places, e.g. in HANDLER command */
int ha_index_or_rnd_end()
{
@@ -1160,10 +1160,10 @@
return HA_ERR_WRONG_COMMAND;
}
virtual int index_read(byte * buf, const byte * key,
- uint key_len, enum ha_rkey_function find_flag)
+ uint key_len, enum ha_rkey_function find_flag)
{ return HA_ERR_WRONG_COMMAND; }
virtual int index_read_idx(byte * buf, uint index, const byte * key,
- uint key_len, enum ha_rkey_function find_flag);
+ uint key_len, enum ha_rkey_function find_flag);
virtual int index_next(byte * buf)
{ return HA_ERR_WRONG_COMMAND; }
virtual int index_prev(byte * buf)
@@ -1273,7 +1273,7 @@
int check_old_types();
/* to be actually called to get 'check()' functionality*/
int ha_check(THD *thd, HA_CHECK_OPT *check_opt);
-
+
virtual int backup(THD* thd, HA_CHECK_OPT* check_opt)
{ return HA_ADMIN_NOT_IMPLEMENTED; }
/*
@@ -1393,7 +1393,7 @@
virtual int rename_table(const char *from, const char *to);
virtual int delete_table(const char *name);
virtual void drop_table(const char *name);
-
+
virtual int create(const char *name, TABLE *form, HA_CREATE_INFO *info)=0;
#define CHF_CREATE_FLAG 0
@@ -1428,17 +1428,17 @@
/* lock_count() can be more than one if the table is a MERGE */
virtual uint lock_count(void) const { return 1; }
virtual THR_LOCK_DATA **store_lock(THD *thd,
- THR_LOCK_DATA **to,
- enum thr_lock_type lock_type)=0;
+ THR_LOCK_DATA **to,
+ enum thr_lock_type lock_type)=0;
/* Type of table for caching query */
virtual uint8 table_cache_type() { return HA_CACHE_TBL_NONTRANSACT; }
/* ask handler about permission to cache table when query is to be cached */
virtual my_bool register_query_cache_table(THD *thd, char *table_key,
- uint key_length,
- qc_engine_callback
- *engine_callback,
- ulonglong *engine_data)
+ uint key_length,
+ qc_engine_callback
+ *engine_callback,
+ ulonglong *engine_data)
{
*engine_callback= 0;
return 1;
@@ -1454,7 +1454,7 @@
{
return memcmp(ref1, ref2, ref_length);
}
-
+
/*
Condition pushdown to storage engines
*/
@@ -1463,7 +1463,7 @@
Push condition down to the table handler.
SYNOPSIS
cond_push()
- cond Condition to be pushed. The condition tree must not be
+ cond Condition to be pushed. The condition tree must not be
modified by the by the caller.
RETURN
The 'remainder' condition that caller must use to filter out records.
@@ -1472,14 +1472,14 @@
NOTES
The pushed conditions form a stack (from which one can remove the
last pushed condition using cond_pop).
- The table handler filters out rows using (pushed_cond1 AND pushed_cond2
+ The table handler filters out rows using (pushed_cond1 AND pushed_cond2
AND ... AND pushed_condN)
or less restrictive condition, depending on handler's capabilities.
-
+
handler->extra(HA_EXTRA_RESET) call empties the condition stack.
Calls to rnd_init/rnd_end, index_init/index_end etc do not affect the
condition stack.
- */
+ */
virtual const COND *cond_push(const COND *cond) { return cond; };
/*
Pop the top condition from the condition stack of the handler instance.
@@ -1489,7 +1489,7 @@
*/
virtual void cond_pop() { return; };
virtual bool check_if_incompatible_data(HA_CREATE_INFO *create_info,
- uint table_changes)
+ uint table_changes)
{ return COMPATIBLE_DATA_NO; }
private:
@@ -1521,7 +1521,7 @@
}
};
- /* Some extern variables used with handlers */
+ /* Some extern variables used with handlers */
extern handlerton *sys_table_types[];
extern const char *ha_row_type[];
@@ -1529,7 +1529,7 @@
extern TYPELIB myisam_stats_method_typelib;
extern ulong total_ha, total_ha_2pc;
- /* Wrapper functions */
+ /* Wrapper functions */
#define ha_commit_stmt(thd) (ha_commit_trans((thd), FALSE))
#define ha_rollback_stmt(thd) (ha_rollback_trans((thd), FALSE))
#define ha_commit(thd) (ha_commit_trans((thd), TRUE))
@@ -1579,7 +1579,7 @@
int ha_create_table(THD *thd, const char *path,
const char *db, const char *table_name,
HA_CREATE_INFO *create_info,
- bool update_create_info);
+ bool update_create_info);
int ha_delete_table(THD *thd, handlerton *db_type, const char *path,
const char *db, const char *alias, bool generate_warning);
| Thread |
|---|
| • bk commit into 5.1 tree (grog:1.2161) | Greg Lehey | 8 Jun |