summaryrefslogtreecommitdiff
path: root/include/myisam.h
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2002-06-11 11:20:31 +0300
committerunknown <monty@mashka.mysql.fi>2002-06-11 11:20:31 +0300
commit595f3d5fcee4cf13abebb9fb109bf26541ebc08d (patch)
tree8fcaabe013fff43cf466235067f2c47f0cd66531 /include/myisam.h
parent71d8649298ba20bb57a85a068b04d2d8c8cf9feb (diff)
downloadmariadb-git-595f3d5fcee4cf13abebb9fb109bf26541ebc08d.tar.gz
Big code cleanup/review before 4.0.2 release.
(All commit emails since 4.0.1 checked) This had to be done now, before the 4.1 tree changes to much, to make it easy to propagate bug fixes to the 4.1 tree. BUILD/SETUP.sh: Added -DPEDANTIC_SAFEMALLOC as standard debug option Docs/manual.texi: Changes for new version. client/mysql.cc: Fixed default value for rehash cleanup client/mysqladmin.c: Cleanup client/mysqlbinlog.cc: cleanup client/mysqldump.c: Cleanup client/mysqlmanager-pwgen.c: Cleanup client/mysqlmanagerc.c: Cleanup client/mysqltest.c: Cleanup dbug/dbug.c: Cleanup extra/resolve_stack_dump.c: Cleanup & Simple optimizations include/ft_global.h: Cleanup include/my_alloc.h: Cleanup include/my_global.h: Cleanup include/my_sys.h: Cleanup include/myisam.h: Cleanup libmysql/libmysql.c: Cleanup libmysql/manager.c: Cleanup myisam/ft_boolean_search.c: Cleanup myisam/ft_dump.c: Change strcpy -> strmov myisam/ft_eval.c: Cleanup myisam/ft_nlq_search.c: Cleanup myisam/ft_test1.c: strncpy -> strnmov myisam/ft_update.c: Cleanup myisam/mi_static.c: Cleanup myisam/mi_test2.c: Cleanup myisam/mi_write.c: Cleanup mysys/mf_fn_ext.c: Cleanup mysys/mf_iocache.c: Cleanup mysys/mf_iocache2.c: Cleanup mysys/my_getopt.c: Cleanup mysys/my_read.c: Cleanup mysys/my_thr_init.c: Cleanup mysys/queues.c: Cleanup mysys/safemalloc.c: Cleanup sql/field.cc: Indentation cleanups sql/ha_berkeley.cc: Indentation cleanups sql/ha_myisam.cc: Cleanup sql/item.h: Indentation cleanups sql/item_cmpfunc.cc: Indentation cleanups sql/item_create.cc: cleanup sql/item_func.cc: Cleanup sql/item_func.h: Indentation cleanups sql/item_strfunc.cc: Indentation cleanups sql/item_sum.cc: Indentation cleanups sql/item_timefunc.cc: Indentation cleanups sql/lock.cc: Indentation cleanups sql/log.cc: Cleanup strnmov -> strmake sql/log_event.cc: Cleanup + optimizations Fixed memory leak Added missing pthread_mutex_unlock() (On error condition) sql/log_event.h: Indentation and comment cleanup Merged #ifdef's into common blocks for better readability sql/mini_client.cc: Indentation cleanup sql/mysql_priv.h: Cleanup Changed int function to bool sql/mysqld.cc: Indentation and comment cleanup sql/net_pkg.cc: Indentation cleanup sql/net_serv.cc: Changed int function -> bool sql/nt_servc.cc: Cleanup sql/opt_range.cc: Indentation cleanup sql/repl_failsafe.cc: Cleanup + simple optimization strnmov -> strmake sql/slave.cc: strnmov -> strmake Cleanups sql/slave.h: Cleanup sql/sql_acl.cc: Indentation and DBUG_PRINT cleanup Changed WITH MAX... to not use = sql/sql_base.cc: Indentation cleanup sql/sql_cache.cc: Indentation cleanup sql/sql_class.cc: Indentation cleanup sql/sql_class.h: Renamed some struct slots sql/sql_delete.cc: Indentation cleanup sql/sql_handler.cc: Indentation cleanup sql/sql_insert.cc: Use new slot names. sql/sql_lex.cc: Indentation cleanup sql/sql_lex.h: Indentation cleanup sql/sql_load.cc: Indentation cleanup sql/sql_parse.cc: Indentation cleanup Removed not used check from LOCK TABLES sql/sql_repl.cc: strnmov -> strmake sql/sql_repl.h: Removed test if file is included (We want to know if it's included twice to avoid this) sql/sql_select.cc: Indentation cleanup sql/sql_show.cc: Indentation cleanup sql/sql_string.cc: Indentation cleanup sql/sql_table.cc: Indentation cleanup sql/sql_union.cc: Use renamed struct slot sql/sql_update.cc: Indentation cleanup sql/sql_yacc.yy: Removed = after GRANT ... MAX_ to make the syntax uniform sql/table.cc: Indentation cleanup sql/table.h: Indentation cleanup sql/time.cc: Indentation cleanup sql/udf_example.cc: Indentation cleanup sql/unireg.cc: strnmov -> strmake tests/grant.pl: Added test for LOCK TABLES tools/mysqlmanager.c: Cleanup fopen() -> my_fopen() vio/viosocket.c: DBUG_PRINT cleanups vio/viosslfactories.c: Indentation cleanup Checking of results from malloc() Fixed possible memory leak BitKeeper/etc/ignore: Added scripts/mysql_secure_installation to the ignore list BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'include/myisam.h')
-rw-r--r--include/myisam.h41
1 files changed, 24 insertions, 17 deletions
diff --git a/include/myisam.h b/include/myisam.h
index b7010dab814..0a7e23e7988 100644
--- a/include/myisam.h
+++ b/include/myisam.h
@@ -170,9 +170,11 @@ typedef struct st_mi_decode_tree /* Decode huff-table */
struct st_mi_bit_buff;
-/* Note that null markers should always be first in a row !
- When creating a column, one should only specify:
- type, length, null_bit and null_pos */
+/*
+ Note that null markers should always be first in a row !
+ When creating a column, one should only specify:
+ type, length, null_bit and null_pos
+*/
typedef struct st_columndef /* column information */
{
@@ -253,14 +255,15 @@ extern uint mi_get_pointer_length(ulonglong file_length, uint def);
#define MYISAMCHK_VERIFY 2 /* run equivalent of myisamchk -c,
* if corruption is detected, do myisamchk -r*/
-/* definitions needed for myisamchk.c -- by Sasha Pachev */
+/*
+ Definitions needed for myisamchk.c
-/* entries marked as "QQ to be removed" are NOT used to
- * pass check/repair options to mi_check.c. They are used
- * internally by myisamchk.c or/and ha_myisam.cc and should NOT
- * be stored together with other flags. They should be removed
- * from the following list to make adding of new flags possible.
- * -- Sergei */
+ Entries marked as "QQ to be removed" are NOT used to
+ pass check/repair options to mi_check.c. They are used
+ internally by myisamchk.c or/and ha_myisam.cc and should NOT
+ be stored together with other flags. They should be removed
+ from the following list to make adding of new flags possible.
+*/
#define T_VERBOSE 1
#define T_SILENT 2
@@ -295,9 +298,10 @@ extern uint mi_get_pointer_length(ulonglong file_length, uint def);
#define T_QUICK (1L << 30)
#define T_RETRY_WITHOUT_QUICK (1L << 31)
-/* flags used by myisamchk.c or/and ha_myisam.cc that are NOT passed
- * to mi_check.c follows:
- * */
+/*
+ Flags used by myisamchk.c or/and ha_myisam.cc that are NOT passed
+ to mi_check.c follows:
+*/
#define TT_USEFRM 1
@@ -307,7 +311,8 @@ extern uint mi_get_pointer_length(ulonglong file_length, uint def);
/* these struct is used by my_check to tell it what to do */
-typedef struct st_sort_key_blocks { /* Used when sorting */
+typedef struct st_sort_key_blocks /* Used when sorting */
+{
uchar *buff,*end_pos;
uchar lastkey[MI_MAX_POSSIBLE_KEY_BUFF];
uint last_length;
@@ -316,7 +321,8 @@ typedef struct st_sort_key_blocks { /* Used when sorting */
struct st_mi_check_param;
-typedef struct st_sort_info {
+typedef struct st_sort_info
+{
MI_INFO *info;
struct st_mi_check_param *param;
enum data_file_type new_data_file_type;
@@ -364,7 +370,8 @@ typedef struct st_mi_check_param
} MI_CHECK;
-typedef struct st_mi_sortinfo {
+typedef struct st_mi_sortinfo
+{
ha_rows max_records;
SORT_INFO *sort_info;
char *tmpdir;
@@ -403,7 +410,7 @@ int filecopy(MI_CHECK *param, File to,File from,my_off_t start,
int movepoint(MI_INFO *info,byte *record,my_off_t oldpos,
my_off_t newpos, uint prot_key);
int sort_write_record(SORT_INFO *sort_info);
- int write_data_suffix(MI_CHECK *param, MI_INFO *info);
+int write_data_suffix(MI_CHECK *param, MI_INFO *info);
int _create_index_by_sort(MI_SORT_PARAM *info,my_bool no_messages,
ulong);
int test_if_almost_full(MI_INFO *info);