Doxygenize comments.

parent dee842e0
......@@ -13,7 +13,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
/**
@file
It is interface module to fixed precision decimals library.
Most functions use 'uint mask' as parameter, if during operation error
......@@ -34,14 +36,14 @@ C_MODE_END
#define DECIMAL_LONG_DIGITS 10
#define DECIMAL_LONG3_DIGITS 8
/* maximum length of buffer in our big digits (uint32) */
/** maximum length of buffer in our big digits (uint32). */
#define DECIMAL_BUFF_LENGTH 9
/* the number of digits that my_decimal can possibly contain */
#define DECIMAL_MAX_POSSIBLE_PRECISION (DECIMAL_BUFF_LENGTH * 9)
/*
/**
maximum guaranteed precision of number in decimal digits (number of our
digits * number of decimal digits in one our big digit - number of decimal
digits in one our big digit decreased by 1 (because we always put decimal
......@@ -51,13 +53,14 @@ C_MODE_END
#define DECIMAL_MAX_SCALE 30
#define DECIMAL_NOT_SPECIFIED 31
/*
/**
maximum length of string representation (number of maximum decimal
digits + 1 position for sign + 1 position for decimal point)
*/
#define DECIMAL_MAX_STR_LENGTH (DECIMAL_MAX_POSSIBLE_PRECISION + 2)
/*
maximum size of packet length
/**
maximum size of packet length.
*/
#define DECIMAL_MAX_FIELD_SIZE DECIMAL_MAX_PRECISION
......@@ -78,11 +81,12 @@ inline int my_decimal_int_part(uint precision, uint decimals)
}
/*
my_decimal class limits 'decimal_t' type to what we need in MySQL
/**
my_decimal class limits 'decimal_t' type to what we need in MySQL.
It contains internally all necessary space needed by the instance so
no extra memory is needed. One should call fix_buffer_pointer() function
when he moves my_decimal objects in memory
when he moves my_decimal objects in memory.
*/
class my_decimal :public decimal_t
......@@ -384,7 +388,10 @@ int my_decimal_mod(uint mask, my_decimal *res, const my_decimal *a,
}
/* Returns -1 if a<b, 1 if a>b and 0 if a==b */
/**
@return
-1 if a<b, 1 if a>b and 0 if a==b
*/
inline
int my_decimal_cmp(const my_decimal *a, const my_decimal *b)
{
......
......@@ -13,10 +13,13 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
/**
@file
@details
Mostly this file is used in the server. But a little part of it is used in
mysqlbinlog too (definition of SELECT_DISTINCT and others).
The consequence is that 90% of the file is wrapped in #ifndef MYSQL_CLIENT,
The consequence is that 90% of the file is wrapped in \#ifndef MYSQL_CLIENT,
except the part which must be in the server and in the client.
*/
......@@ -253,12 +256,12 @@ class Default_object_creation_ctx : public Object_creation_ctx
Feel free to raise this by the smallest amount you can to get the
"execution_constants" test to pass.
*/
#define STACK_MIN_SIZE 12000 // Abort if less stack during eval.
#define STACK_MIN_SIZE 12000 ///< Abort if less stack during eval.
#define STACK_MIN_SIZE_FOR_OPEN 1024*80
#define STACK_BUFF_ALLOC 352 // For stack overrun checks
#define STACK_BUFF_ALLOC 352 ///< For stack overrun checks
#ifndef MYSQLD_NET_RETRY_COUNT
#define MYSQLD_NET_RETRY_COUNT 10 // Abort read after this many int.
#define MYSQLD_NET_RETRY_COUNT 10 ///< Abort read after this many int.
#endif
#define TEMP_POOL_SIZE 128
......@@ -282,14 +285,14 @@ class Default_object_creation_ctx : public Object_creation_ctx
#define MIN_ROWS_TO_USE_TABLE_CACHE 100
#define MIN_ROWS_TO_USE_BULK_INSERT 100
/*
/**
The following is used to decide if MySQL should use table scanning
instead of reading with keys. The number says how many evaluation of the
WHERE clause is comparable to reading one extra row from a table.
*/
#define TIME_FOR_COMPARE 5 // 5 compares == one read
/*
/**
Number of comparisons of table rowids equivalent to reading one row from a
table.
*/
......@@ -309,17 +312,17 @@ class Default_object_creation_ctx : public Object_creation_ctx
#define DISK_SEEK_PROP_COST ((double)0.5/BLOCKS_IN_AVG_SEEK)
/*
/**
Number of rows in a reference table when refereed through a not unique key.
This value is only used when we don't know anything about the key
distribution.
*/
#define MATCHING_ROWS_IN_OTHER_TABLE 10
/* Don't pack string keys shorter than this (if PACK_KEYS=1 isn't used) */
/** Don't pack string keys shorter than this (if PACK_KEYS=1 isn't used). */
#define KEY_DEFAULT_PACK_LENGTH 8
/* Characters shown for the command in 'show processlist' */
/** Characters shown for the command in 'show processlist'. */
#define PROCESS_LIST_WIDTH 100
/* Characters shown for the command in 'information_schema.processlist' */
#define PROCESS_LIST_INFO_WIDTH 65535
......@@ -335,11 +338,11 @@ class Default_object_creation_ctx : public Object_creation_ctx
/* The following can also be changed from the command line */
#define DEFAULT_CONCURRENCY 10
#define DELAYED_LIMIT 100 /* pause after xxx inserts */
#define DELAYED_LIMIT 100 /**< pause after xxx inserts */
#define DELAYED_QUEUE_SIZE 1000
#define DELAYED_WAIT_TIMEOUT 5*60 /* Wait for delayed insert */
#define FLUSH_TIME 0 /* Don't flush tables */
#define MAX_CONNECT_ERRORS 10 // errors before disabling host
#define DELAYED_WAIT_TIMEOUT 5*60 /**< Wait for delayed insert */
#define FLUSH_TIME 0 /**< Don't flush tables */
#define MAX_CONNECT_ERRORS 10 ///< errors before disabling host
#ifdef __NETWARE__
#define IF_NETWARE(A,B) A
......@@ -349,7 +352,7 @@ class Default_object_creation_ctx : public Object_creation_ctx
#if defined(__WIN__)
#undef FLUSH_TIME
#define FLUSH_TIME 1800 /* Flush every half hour */
#define FLUSH_TIME 1800 /**< Flush every half hour */
#define INTERRUPT_PRIOR -2
#define CONNECT_PRIOR -1
......@@ -368,12 +371,12 @@ class Default_object_creation_ctx : public Object_creation_ctx
#define TEST_MIT_THREAD 4
#define TEST_BLOCKING 8
#define TEST_KEEP_TMP_TABLES 16
#define TEST_READCHECK 64 /* Force use of readcheck */
#define TEST_READCHECK 64 /**< Force use of readcheck */
#define TEST_NO_EXTRA 128
#define TEST_CORE_ON_SIGNAL 256 /* Give core if signal */
#define TEST_CORE_ON_SIGNAL 256 /**< Give core if signal */
#define TEST_NO_STACKTRACE 512
#define TEST_SIGINT 1024 /* Allow sigint on threads */
#define TEST_SYNCHRONIZATION 2048 /* get server to do sleep in
#define TEST_SIGINT 1024 /**< Allow sigint on threads */
#define TEST_SYNCHRONIZATION 2048 /**< get server to do sleep in
some places */
#endif
......@@ -423,26 +426,26 @@ class Default_object_creation_ctx : public Object_creation_ctx
/* The following is used to detect a conflict with DISTINCT */
#define SELECT_ALL (ULL(1) << 24) // SELECT, user, parser
/* The following can be set when importing tables in a 'wrong order'
/** The following can be set when importing tables in a 'wrong order'
to suppress foreign key checks */
#define OPTION_NO_FOREIGN_KEY_CHECKS (ULL(1) << 26) // THD, user, binlog
/* The following speeds up inserts to InnoDB tables by suppressing unique
/** The following speeds up inserts to InnoDB tables by suppressing unique
key checks in some cases */
#define OPTION_RELAXED_UNIQUE_CHECKS (ULL(1) << 27) // THD, user, binlog
#define SELECT_NO_UNLOCK (ULL(1) << 28) // SELECT, intern
#define OPTION_SCHEMA_TABLE (ULL(1) << 29) // SELECT, intern
/* Flag set if setup_tables already done */
/** Flag set if setup_tables already done */
#define OPTION_SETUP_TABLES_DONE (ULL(1) << 30) // intern
/* If not set then the thread will ignore all warnings with level notes. */
/** If not set then the thread will ignore all warnings with level notes. */
#define OPTION_SQL_NOTES (ULL(1) << 31) // THD, user
/*
/**
Force the used temporary table to be a MyISAM table (because we will use
fulltext functions when reading from it.
*/
#define TMP_TABLE_FORCE_MYISAM (ULL(1) << 32)
/*
/**
Maximum length of time zone name that we support
(Time zone name is char(64) in db). mysqlbinlog needs it.
*/
......@@ -505,9 +508,9 @@ class Default_object_creation_ctx : public Object_creation_ctx
#define UNCACHEABLE_DEPENDENT 1
#define UNCACHEABLE_RAND 2
#define UNCACHEABLE_SIDEEFFECT 4
// forcing to save JOIN for explain
/// forcing to save JOIN for explain
#define UNCACHEABLE_EXPLAIN 8
/* Don't evaluate subqueries in prepare even if they're not correlated */
/** Don't evaluate subqueries in prepare even if they're not correlated */
#define UNCACHEABLE_PREPARE 16
/* For uncorrelated SELECT in an UNION with some correlated SELECTs */
#define UNCACHEABLE_UNITED 32
......@@ -515,7 +518,7 @@ class Default_object_creation_ctx : public Object_creation_ctx
/* Used to check GROUP BY list in the MODE_ONLY_FULL_GROUP_BY mode */
#define UNDEF_POS (-1)
#ifdef EXTRA_DEBUG
/*
/**
Sync points allow us to force the server to reach a certain line of code
and block there until the client tells the server it is ok to go on.
The client tells the server to block with SELECT GET_LOCK()
......@@ -551,7 +554,7 @@ void view_store_options(THD *thd, TABLE_LIST *table, String *buff);
#define portable_sizeof_char_ptr 8
#define tmp_file_prefix "#sql" /* Prefix for tmp tables */
#define tmp_file_prefix "#sql" /**< Prefix for tmp tables */
#define tmp_file_prefix_length 4
/* Flags for calc_week() function. */
......@@ -587,8 +590,8 @@ enum enum_check_fields
CHECK_FIELD_ERROR_FOR_NULL
};
/* Struct to handle simple linked lists */
/** Struct to handle simple linked lists. */
typedef struct st_sql_list {
uint elements;
uchar *first;
......@@ -2192,16 +2195,15 @@ Item * all_any_subquery_creator(Item *left_expr,
bool all,
SELECT_LEX *select_lex);
/*
clean/setup table fields and map
/**
clean/setup table fields and map.
SYNOPSYS
setup_table_map()
table - TABLE structure pointer (which should be setup)
table_list TABLE_LIST structure pointer (owner of TABLE)
tablenr - table number
@param table TABLE structure pointer (which should be setup)
@param table_list TABLE_LIST structure pointer (owner of TABLE)
@param tablenr table number
*/
inline void setup_table_map(TABLE *table, TABLE_LIST *table_list, uint tablenr)
{
table->used_fields= 0;
......@@ -2223,10 +2225,8 @@ inline void setup_table_map(TABLE *table, TABLE_LIST *table_list, uint tablenr)
}
/*
SYNOPSYS
hexchar_to_int()
convert a hex digit into number
/**
convert a hex digit into number.
*/
inline int hexchar_to_int(char c)
......@@ -2239,11 +2239,9 @@ inline int hexchar_to_int(char c)
return -1;
}
/*
is_user_table()
return true if the table was created explicitly
/**
return true if the table was created explicitly.
*/
inline bool is_user_table(TABLE * table)
{
const char *name= table->s->table_name.str;
......
......@@ -13,8 +13,11 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
Set MYSQL_SERVER_SUFFIX_STR
/**
@file
Set MYSQL_SERVER_SUFFIX_STR.
The following code is quite ugly as there is no portable way to easily set a
string to the value of a macro
*/
......
/* ------------------------------------------------------------------------
/**
@file
@brief
Windows NT Service class library
Copyright Abandoned 1998 Irena Pancirov - Irnet Snc
This file is public domain and comes with NO WARRANTY of any kind
-------------------------------------------------------------------------- */
*/
// main application thread
typedef void (*THREAD_FC)(void *);
......@@ -13,7 +17,7 @@ class NTService
NTService();
~NTService();
BOOL bOsNT; // true if OS is NT, false for Win95
BOOL bOsNT; ///< true if OS is NT, false for Win95
//install optinos
DWORD dwDesiredAccess;
DWORD dwServiceType;
......
......@@ -20,27 +20,27 @@
#define PARSE_FILE_TIMESTAMPLENGTH 19
enum file_opt_type {
FILE_OPTIONS_STRING, /* String (LEX_STRING) */
FILE_OPTIONS_ESTRING, /* Escaped string (LEX_STRING) */
FILE_OPTIONS_ULONGLONG, /* ulonglong parameter (ulonglong) */
FILE_OPTIONS_REV, /* Revision version number (ulonglong) */
FILE_OPTIONS_TIMESTAMP, /* timestamp (LEX_STRING have to be
FILE_OPTIONS_STRING, /**< String (LEX_STRING) */
FILE_OPTIONS_ESTRING, /**< Escaped string (LEX_STRING) */
FILE_OPTIONS_ULONGLONG, /**< ulonglong parameter (ulonglong) */
FILE_OPTIONS_REV, /**< Revision version number (ulonglong) */
FILE_OPTIONS_TIMESTAMP, /**< timestamp (LEX_STRING have to be
allocated with length 20 (19+1) */
FILE_OPTIONS_STRLIST, /* list of escaped strings
FILE_OPTIONS_STRLIST, /**< list of escaped strings
(List<LEX_STRING>) */
FILE_OPTIONS_ULLLIST /* list of ulonglong values
FILE_OPTIONS_ULLLIST /**< list of ulonglong values
(List<ulonglong>) */
};
struct File_option
{
LEX_STRING name; /* Name of the option */
int offset; /* offset to base address of value */
file_opt_type type; /* Option type */
LEX_STRING name; /**< Name of the option */
int offset; /**< offset to base address of value */
file_opt_type type; /**< Option type */
};
/*
/**
This hook used to catch no longer supported keys and process them for
backward compatibility.
*/
......@@ -55,7 +55,7 @@ class Unknown_key_hook
};
/* Dummy hook for parsers which do not need hook for unknown keys */
/** Dummy hook for parsers which do not need hook for unknown keys. */
class File_parser_dummy_hook: public Unknown_key_hook
{
......
......@@ -20,8 +20,8 @@
#pragma interface /* gcc class implementation */
#endif
#define PROC_NO_SORT 1 /* Bits in flags */
#define PROC_GROUP 2 /* proc must have group */
#define PROC_NO_SORT 1 /**< Bits in flags */
#define PROC_GROUP 2 /**< proc must have group */
/* Procedure items used by procedures to store values for send_fields */
......
......@@ -110,7 +110,7 @@ class Protocol
};
/* Class used for the old (MySQL 4.0 protocol) */
/** Class used for the old (MySQL 4.0 protocol). */
class Protocol_text :public Protocol
{
......
This diff is collapsed.
......@@ -66,7 +66,7 @@ struct Query_cache_result;
class Query_cache;
/**
@brief This class represents a node in the linked chain of queries
This class represents a node in the linked chain of queries
belonging to one table.
@note The root of this linked list is not a query-type block, but the table-
......
......@@ -77,10 +77,10 @@ typedef struct st_user_var_events
was actually changed or not.
*/
typedef struct st_copy_info {
ha_rows records; /* Number of processed records */
ha_rows deleted; /* Number of deleted records */
ha_rows updated; /* Number of updated records */
ha_rows copied; /* Number of copied records */
ha_rows records; /**< Number of processed records */
ha_rows deleted; /**< Number of deleted records */
ha_rows updated; /**< Number of updated records */
ha_rows copied; /**< Number of copied records */
ha_rows error_count;
ha_rows touched; /* Number of touched records */
enum enum_duplicates handle_duplicates;
......@@ -1045,14 +1045,17 @@ class THD :public Statement,
*/
char *catalog;
/*
WARNING: some members of THD (currently 'Statement::db',
/**
@note
Some members of THD (currently 'Statement::db',
'catalog' and 'query') are set and alloced by the slave SQL thread
(for the THD of that thread); that thread is (and must remain, for now)
the only responsible for freeing these 3 members. If you add members
here, and you add code to set them in replication, don't forget to
free_them_and_set_them_to_0 in replication properly. For details see
the 'err:' label of the handle_slave_sql() in sql/slave.cc.
@see handle_slave_sql
*/
Security_context main_security_ctx;
......
......@@ -20,12 +20,14 @@
#pragma interface /* gcc class interface */
#endif
/*
/**
@file
Declarations for implementation of server side cursors. Only
read-only non-scrollable cursors are currently implemented.
*/
/*
/**
Server_side_cursor -- an interface for materialized and
sensitive (non-materialized) implementation of cursors. All
cursors are self-contained (created in their own memory root).
......@@ -36,7 +38,7 @@
class Server_side_cursor: protected Query_arena, public Sql_alloc
{
protected:
/* Row destination used for fetch */
/** Row destination used for fetch */
select_result *result;
public:
Server_side_cursor(MEM_ROOT *mem_root_arg, select_result *result_arg)
......@@ -58,8 +60,7 @@ int mysql_open_cursor(THD *thd, uint flags,
select_result *result,
Server_side_cursor **res);
/* Possible values for flags */
/** Possible values for flags */
enum { ANY_CURSOR= 1, ALWAYS_MATERIALIZED_CURSOR= 2 };
#endif /* _sql_cusor_h_ */
This diff is collapsed.
......@@ -14,7 +14,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
/**
This class holds all information about triggers of table.
QQ: Will it be merged into TABLE in the future ?
......@@ -22,20 +22,20 @@
class Table_triggers_list: public Sql_alloc
{
/* Triggers as SPs grouped by event, action_time */
/** Triggers as SPs grouped by event, action_time */
sp_head *bodies[TRG_EVENT_MAX][TRG_ACTION_MAX];
/*
/**
Heads of the lists linking items for all fields used in triggers
grouped by event and action_time.
*/
Item_trigger_field *trigger_fields[TRG_EVENT_MAX][TRG_ACTION_MAX];
/*
/**
Copy of TABLE::Field array with field pointers set to TABLE::record[1]
buffer instead of TABLE::record[0] (used for OLD values in on UPDATE
trigger and DELETE trigger when it is called for REPLACE).
*/
Field **record1_field;
/*
/**
During execution of trigger new_field and old_field should point to the
array of fields representing new or old version of row correspondingly
(so it can point to TABLE::field or to Tale_triggers_list::record1_field)
......@@ -45,30 +45,30 @@ class Table_triggers_list: public Sql_alloc
/* TABLE instance for which this triggers list object was created */
TABLE *trigger_table;
/*
/**
Names of triggers.
Should correspond to order of triggers on definitions_list,
used in CREATE/DROP TRIGGER for looking up trigger by name.
*/
List<LEX_STRING> names_list;
/*
/**
List of "ON table_name" parts in trigger definitions, used for
updating trigger definitions during RENAME TABLE.
*/
List<LEX_STRING> on_table_names_list;
/*
/**
Grant information for each trigger (pair: subject table, trigger definer).
*/
GRANT_INFO subject_table_grants[TRG_EVENT_MAX][TRG_ACTION_MAX];
public:
/*
/**
Field responsible for storing triggers definitions in file.
It have to be public because we are using it directly from parser.
*/
List<LEX_STRING> definitions_list;
/*
/**
List of sql modes for triggers
*/
List<ulonglong> definition_modes_list;
......
......@@ -209,7 +209,7 @@ typedef struct user_conn {
char *user;
/* Pointer to host part of the key. */
char *host;
/*
/**
The moment of time when per hour counters were reset last time
(i.e. start of "hour" for conn_per_hour, updates, questions counters).
*/
......
......@@ -20,7 +20,7 @@
#if !defined(TESTTIME) && !defined(TZINFO2SQL)
/*
/**
This class represents abstract time zone and provides
basic interface for MYSQL_TIME <-> my_time_t conversion.
Actual time zones which are specified by DB, or via offset
......@@ -30,7 +30,7 @@ class Time_zone: public Sql_alloc
{
public:
Time_zone() {} /* Remove gcc warning */
/*
/**
Converts local time in broken down MYSQL_TIME representation to
my_time_t (UTC seconds since Epoch) represenation.
Returns 0 in case of error. Sets in_dst_time_gap to true if date provided
......@@ -38,19 +38,19 @@ class Time_zone: public Sql_alloc
*/
virtual my_time_t TIME_to_gmt_sec(const MYSQL_TIME *t,
my_bool *in_dst_time_gap) const = 0;
/*
/**
Converts time in my_time_t representation to local time in
broken down MYSQL_TIME representation.
*/
virtual void gmt_sec_to_TIME(MYSQL_TIME *tmp, my_time_t t) const = 0;
/*
/**
Because of constness of String returned by get_name() time zone name
have to be already zeroended to be able to use String::ptr() instead
of c_ptr().
*/
virtual const String * get_name() const = 0;
/*
/**
We need this only for surpressing warnings, objects of this type are
allocated on MEM_ROOT and should not require destruction.
*/
......@@ -65,7 +65,7 @@ extern my_bool my_tz_init(THD *org_thd, const char *default_tzname, my_bool
extern void my_tz_free();
extern my_time_t sec_since_epoch_TIME(MYSQL_TIME *t);
/*
/**
Number of elements in table list produced by my_tz_get_table_list()
(this table list contains tables which are needed for dynamical loading
of time zone descriptions). Actually it is imlementation detail that
......
......@@ -155,34 +155,34 @@
#define OPEN_VIEW 8192 /* Allow open on view */
#define OPEN_VIEW_NO_PARSE 16384 /* Open frm only if it's a view,
but do not parse view itself */
/*
/**
This flag is used in function get_all_tables() which fills
I_S tables with data which are retrieved from frm files and storage engine
The flag means that we need to open FRM file only to get necessary data.
*/
#define OPEN_FRM_FILE_ONLY 32768
/*
/**
This flag is used in function get_all_tables() which fills
I_S tables with data which are retrieved from frm files and storage engine
The flag means that we need to process tables only to get necessary data.
Views are not processed.
*/
#define OPEN_TABLE_ONLY OPEN_FRM_FILE_ONLY*2
/*
/**
This flag is used in function get_all_tables() which fills
I_S tables with data which are retrieved from frm files and storage engine
The flag means that we need to process views only to get necessary data.
Tables are not processed.
*/
#define OPEN_VIEW_ONLY OPEN_TABLE_ONLY*2
/*
/**
This flag is used in function get_all_tables() which fills
I_S tables with data which are retrieved from frm files and storage engine.
The flag means that we need to open a view using
open_normal_and_derived_tables() function.
*/
#define OPEN_VIEW_FULL OPEN_VIEW_ONLY*2
/*
/**
This flag is used in function get_all_tables() which fills
I_S tables with data which are retrieved from frm files and storage engine.
The flag means that I_S table uses optimization algorithm.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment