List:Commits« Previous MessageNext Message »
From:Chad MILLER Date:October 9 2007 9:56pm
Subject:bk commit into 5.1 tree (cmiller:1.2583)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of cmiller. When cmiller 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@stripped, 2007-10-09 17:56:32-04:00, cmiller@stripped +4 -0
  Doxygenize comments, a*.cc - field.cc .

  sql/derror.cc@stripped, 2007-10-09 17:56:29-04:00, cmiller@stripped +24 -13
    Doxygenize comments.

  sql/des_key_file.cc@stripped, 2007-10-09 17:56:29-04:00, cmiller@stripped +9 -8
    Doxygenize comments.

  sql/discover.cc@stripped, 2007-10-09 17:56:29-04:00, cmiller@stripped +30 -28
    Doxygenize comments.

  sql/field.cc@stripped, 2007-10-09 17:56:29-04:00, cmiller@stripped +251 -268
    Doxygenize comments.

diff -Nrup a/sql/derror.cc b/sql/derror.cc
--- a/sql/derror.cc	2007-05-23 18:39:17 -04:00
+++ b/sql/derror.cc	2007-10-09 17:56:29 -04:00
@@ -14,7 +14,12 @@
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
 
-/* Read language depeneded messagefile */
+/**
+  @file
+
+  @brief
+  Read language depeneded messagefile
+*/
 
 #include "mysql_priv.h"
 #include "mysys_err.h"
@@ -23,20 +28,17 @@ static bool read_texts(const char *file_
 		       uint error_messages);
 static void init_myfunc_errs(void);
 
-/*
+/**
   Read messages from errorfile.
 
-  SYNOPSIS
-    init_errmessage()
+  This function can be called multiple times to reload the messages.
+  If it fails to load the messages, it will fail softly by initializing
+  the errmesg pointer to an array of empty strings or by keeping the
+  old array if it exists.
 
-  DESCRIPTION
-    This function can be called multiple times to reload the messages.
-	If it fails to load the messages, it will fail softly by initializing
-	the errmesg pointer to an array of empty strings or by keeping the
-	old array if it exists.
-
-  RETURN
+  @retval
     FALSE       OK
+  @retval
     TRUE        Error
 */
 
@@ -75,7 +77,14 @@ bool init_errmessage(void)
 }
 
 
-	/* Read text from packed textfile in language-directory */
+/**
+  Read text from packed textfile in language-directory.
+
+  If we can't read messagefile then it's panic- we can't continue.
+
+  @todo
+    Convert the character set to server system character set
+*/
 
 static bool read_texts(const char *file_name,const char ***point,
 		       uint error_messages)
@@ -178,7 +187,9 @@ err1:
 } /* read_texts */
 
 
-	/* Initiates error-messages used by my_func-library */
+/**
+  Initiates error-messages used by my_func-library.
+*/
 
 static void init_myfunc_errs()
 {
diff -Nrup a/sql/des_key_file.cc b/sql/des_key_file.cc
--- a/sql/des_key_file.cc	2006-12-30 15:02:06 -05:00
+++ b/sql/des_key_file.cc	2007-10-09 17:56:29 -04:00
@@ -21,17 +21,18 @@
 struct st_des_keyschedule des_keyschedule[10];
 uint   des_default_key;
 
-/*
- Function which loads DES keys from plaintext file into memory on MySQL
- server startup and on command FLUSH DES_KEY_FILE.
- Blame tonu@stripped on bugs ;)
+#define des_cs	&my_charset_latin1
+
+/**
+  Load DES keys from plaintext file into
+  memory on MySQL server startup and on command FLUSH DES_KEY_FILE.
 
- RETURN
-	0	ok
-	1	Error   
+  @retval
+    0  ok
+  @retval
+    1  Error   
 */
 
-#define des_cs	&my_charset_latin1
 
 bool
 load_des_key_file(const char *file_name)
diff -Nrup a/sql/discover.cc b/sql/discover.cc
--- a/sql/discover.cc	2007-05-10 05:59:26 -04:00
+++ b/sql/discover.cc	2007-10-09 17:56:29 -04:00
@@ -14,29 +14,33 @@
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
 
-/* Functions for discover of frm file from handler */
+/**
+  @file
+
+  @brief
+  Functions for discover of frm file from handler
+*/
 
 #include "mysql_priv.h"
 #include <my_dir.h>
 
-/*
-  Read the contents of a .frm file
+/**
+  Read the contents of a .frm file.
 
-  SYNOPSIS
-    readfrm()
+  frmdata and len are set to 0 on error.
 
-    name           path to table-file "db/name"
-    frmdata        frm data
-    len            length of the read frmdata
-
-  RETURN VALUES
-   0	ok
-   1	Could not open file
-   2    Could not stat file
-   3    Could not allocate data for read
-        Could not read file
-
-   frmdata and len are set to 0 on error
+  @param name           path to table-file "db/name"
+  @param frmdata        frm data
+  @param len            length of the read frmdata
+
+  @retval
+    0	ok
+  @retval
+    1	Could not open file
+  @retval
+    2    Could not stat file
+  @retval
+    3    Could not allocate data for read.  Could not read file
 */
 
 int readfrm(const char *name, uchar **frmdata, size_t *len)
@@ -87,18 +91,16 @@ int readfrm(const char *name, uchar **fr
 
 /*
   Write the content of a frm data pointer 
-  to a frm file
-
-  SYNOPSIS
-    writefrm()
+  to a frm file.
 
-    name           path to table-file "db/name"
-    frmdata        frm data
-    len            length of the frmdata
-
-  RETURN VALUES
-   0	ok
-   2    Could not write file
+  @param name           path to table-file "db/name"
+  @param frmdata        frm data
+  @param len            length of the frmdata
+
+  @retval
+    0	ok
+  @retval
+    2    Could not write file
 */
 
 int writefrm(const char *name, const uchar *frmdata, size_t len)
diff -Nrup a/sql/field.cc b/sql/field.cc
--- a/sql/field.cc	2007-09-14 13:29:15 -04:00
+++ b/sql/field.cc	2007-10-09 17:56:29 -04:00
@@ -14,9 +14,12 @@
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
 
-/*****************************************************************************
-** This file implements classes defined in field.h
-*****************************************************************************/
+/**
+  @file
+
+  @brief
+  This file implements classes defined in field.h
+*/
 
 #ifdef USE_PRAGMA_IMPLEMENTATION
 #pragma implementation				// gcc: Class implementation
@@ -913,14 +916,13 @@ static enum_field_types field_types_merg
   }
 };
 
-/*
-  Return type of which can carry value of both given types in UNION result
+/**
+  Return type of which can carry value of both given types in UNION result.
 
-  SYNOPSIS
-    Field::field_type_merge()
-    a, b  types for merging
+  @param a  type for merging
+  @param b  type for merging
 
-  RETURN
+  @return
     type of field
 */
 
@@ -992,14 +994,12 @@ test_if_important_data(CHARSET_INFO *cs,
 }
 
 
-/*
-  Detect Item_result by given field type of UNION merge result
+/**
+  Detect Item_result by given field type of UNION merge result.
 
-  SYNOPSIS
-    Field::result_merge_type()
-    field_type  given field type
+  @param field_type  given field type
 
-  RETURN
+  @return
     Item_result (type of internal MySQL expression result)
 */
 
@@ -1015,18 +1015,17 @@ Item_result Field::result_merge_type(enu
 *****************************************************************************/
 
 
-/*
-  Check whether a field type can be partially indexed by a key
+/**
+  Check whether a field type can be partially indexed by a key.
 
   This is a static method, rather than a virtual function, because we need
   to check the type of a non-Field in mysql_alter_table().
 
-  SYNOPSIS
-   type_can_have_key_part()
-   type                 field type
+  @param type  field type
 
-  RETURN
+  @retval
     TRUE  Type can have a prefixed key
+  @retval
     FALSE Type can not have a prefixed key
 */
 
@@ -1048,8 +1047,8 @@ bool Field::type_can_have_key_part(enum 
 }
 
 
-/*
-  Numeric fields base class constructor
+/**
+  Numeric fields base class constructor.
 */
 Field_num::Field_num(uchar *ptr_arg,uint32 len_arg, uchar *null_ptr_arg,
                      uchar null_bit_arg, utype unireg_check_arg,
@@ -1080,23 +1079,25 @@ void Field_num::prepend_zeros(String *va
   }
 }
 
-/*
+/**
   Test if given number is a int.
 
-  SYNOPSIS
-    Field_num::check_int
-    cs          Character set
-    str		String to test
-    end		Pointer to char after last used digit
-    length      String length
-    error       Error returned by strntoull10rnd()
+  @todo
+    Make this multi-byte-character safe
 
-  NOTE
+  @param str		String to test
+  @param length        Length of 'str'
+  @param int_end	Pointer to char after last used digit
+  @param cs		Character set
+
+  @note
     This is called after one has called strntoull10rnd() function.
 
-  RETURN
-    0	ok
+  @retval
+    0	OK
+  @retval
     1	error: empty string or wrong integer.
+  @retval
     2   error: garbage at the end of string.
 */
 
@@ -1191,16 +1192,15 @@ out_of_range:
   return 1;
 }
 
-/*
+/**
   Process decimal library return codes and issue warnings for overflow and
   truncation.
 
-  SYNOPSIS
-    Field::warn_if_overflow()
-    op_result  decimal library return code (E_DEC_* see include/decimal.h)
+  @param op_result  decimal library return code (E_DEC_* see include/decimal.h)
 
-  RETURN
+  @retval
     1  there was overflow
+  @retval
     0  no error or some other errors except overflow
 */
 
@@ -1275,10 +1275,10 @@ static bool test_if_real(const char *str
 #endif
 
 
-/*
+/**
   Interpret field value as an integer but return the result as a string.
 
-  This is used for printing bit_fields as numbers while debugging
+  This is used for printing bit_fields as numbers while debugging.
 */
 
 String *Field::val_int_as_str(String *val_buffer, my_bool unsigned_val)
@@ -1299,6 +1299,7 @@ String *Field::val_int_as_str(String *va
 }
 
 
+/// This is used as a table name when the table structure is not set up
 Field::Field(uchar *ptr_arg,uint32 length_arg,uchar *null_ptr_arg,
 	     uchar null_bit_arg,
 	     utype unireg_check_arg, const char *field_name_arg)
@@ -1474,17 +1475,15 @@ void Field::make_field(Send_field *field
 }
 
 
-/*
+/**
   Conversion from decimal to longlong with checking overflow and
-  setting correct value (min/max) in case of overflow
+  setting correct value (min/max) in case of overflow.
 
-  SYNOPSIS
-    Field::convert_decimal2longlong()
-    val             value which have to be converted
-    unsigned_flag   type of integer in which we convert val
-    err             variable to pass error code
+  @param val             value which have to be converted
+  @param unsigned_flag   type of integer in which we convert val
+  @param err             variable to pass error code
 
-  RETURN
+  @return
     value converted from val
 */
 longlong Field::convert_decimal2longlong(const my_decimal *val,
@@ -1518,19 +1517,18 @@ longlong Field::convert_decimal2longlong
 }
 
 
-/*
+/**
   Storing decimal in integer fields.
 
-  SYNOPSIS
-    Field_num::store_decimal()
-    val       value for storing
+  @param val       value for storing
 
-  NOTE
+  @note
     This method is used by all integer fields, real/decimal redefine it
 
-  RETURN
+  @retval
     0     OK
-    != 0  error
+  @retval
+    !=0  error
 */
 
 int Field_num::store_decimal(const my_decimal *val)
@@ -1542,19 +1540,17 @@ int Field_num::store_decimal(const my_de
 }
 
 
-/*
-  Return decimal value of integer field
+/**
+  Return decimal value of integer field.
 
-  SYNOPSIS
-    Field_num::val_decimal()
-    decimal_value     buffer for storing decimal value
+  @param decimal_value     buffer for storing decimal value
 
-  NOTE
-    This method is used by all integer fields, real/decimal redefine it
+  @note
+    This method is used by all integer fields, real/decimal redefine it.
     All longlong values fit in our decimal buffer which cal store 8*9=72
     digits of integer number
 
-  RETURN
+  @return
     pointer to decimal buffer with value of field
 */
 
@@ -1587,22 +1583,24 @@ void Field_num::make_field(Send_field *f
   field->decimals= dec;
 }
 
-/*
-  Decimal representation of Field_str
+/**
+  Decimal representation of Field_str.
 
-  SYNOPSIS
-    Field_str::store_decimal()
-    d         value for storing
+  @param d         value for storing
 
-  NOTE
-    Field_str is the base class for fields like Field_enum, Field_date and some
-    similar.  Some dates use fraction and also string value should be
-    converted to floating point value according our rules, so we use double
-    to store value of decimal in string
+  @note
+    Field_str is the base class for fields like Field_enum,
+    Field_date and some similar. Some dates use fraction and also
+    string value should be converted to floating point value according
+    our rules, so we use double to store value of decimal in string.
 
-  RETURN
+  @todo
+    use decimal2string?
+
+  @retval
     0     OK
-    != 0  error
+  @retval
+    !=0  error
 */
 
 int Field_str::store_decimal(const my_decimal *d)
@@ -1675,11 +1673,11 @@ bool Field::get_time(MYSQL_TIME *ltime)
   return 0;
 }
 
-/*
-  This is called when storing a date in a string
+/**
+  This is called when storing a date in a string.
 
-  NOTES
-    Needs to be changed if/when we want to support different time formats
+  @note
+    Needs to be changed if/when we want to support different time formats.
 */
 
 int Field::store_time(MYSQL_TIME *ltime, timestamp_type type_arg)
@@ -2301,9 +2299,9 @@ String *Field_decimal::val_str(String *v
   return val_ptr;
 }
 
-/*
-** Should be able to handle at least the following fixed decimal formats:
-** 5.00 , -1.0,  05,  -05, +5 with optional pre/end space
+/**
+  Should be able to handle at least the following fixed decimal formats:
+  5.00 , -1.0,  05,  -05, +5 with optional pre/end space
 */
 
 int Field_decimal::cmp(const uchar *a_ptr,const uchar *b_ptr)
@@ -2425,13 +2423,11 @@ int Field_new_decimal::reset(void)
 }
 
 
-/*
+/**
   Generate max/min decimal value in case of overflow.
 
-  SYNOPSIS
-    Field_new_decimal::set_value_on_overflow();
-    decimal_value     buffer for value
-    sign              sign of value which caused overflow
+  @param decimal_value     buffer for value
+  @param sign              sign of value which caused overflow
 */
 
 void Field_new_decimal::set_value_on_overflow(my_decimal *decimal_value,
@@ -2450,21 +2446,19 @@ void Field_new_decimal::set_value_on_ove
 }
 
 
-/*
-  Store decimal value in the binary buffer
-
-  SYNOPSIS
-    store_value(const my_decimal *decimal_value)
-    decimal_value   my_decimal
-
-  DESCRIPTION
-    checks if decimal_value fits into field size.
-    if it does, stores the decimal in the buffer using binary format.
-    Otherwise sets maximal number that can be stored in the field.
+/**
+  Store decimal value in the binary buffer.
 
-  RETURN
-   0 ok
-   1 error
+  Checks if decimal_value fits into field size.
+  If it does, stores the decimal in the buffer using binary format.
+  Otherwise sets maximal number that can be stored in the field.
+
+  @param decimal_value   my_decimal
+
+  @retval
+    0 ok
+  @retval
+    1 error
 */
 
 bool Field_new_decimal::store_value(const my_decimal *decimal_value)
@@ -2573,6 +2567,12 @@ int Field_new_decimal::store(const char 
 }
 
 
+/**
+  @todo
+  Fix following when double2my_decimal when double2decimal
+  will return E_DEC_TRUNCATED always correctly
+*/
+
 int Field_new_decimal::store(double nr)
 {
   ASSERT_COLUMN_MARKED_FOR_WRITE;
@@ -4546,9 +4546,8 @@ void Field_double::sql_type(String &res)
 }
 
 
-/*
-  TIMESTAMP type.
-  Holds datetime values in range from 1970-01-01 00:00:01 UTC to 
+/**
+  TIMESTAMP type holds datetime values in range from 1970-01-01 00:00:01 UTC to 
   2038-01-01 00:00:00 UTC stored as number of seconds since Unix 
   Epoch in UTC.
   
@@ -4581,7 +4580,7 @@ void Field_double::sql_type(String &res)
   NONE - field which is not auto-set on update with some other than NOW() 
     default value (TIMESTAMP DEFAULT 0).
 
-  Note that TIMESTAMP_OLD_FIELD's are never created explicitly now, they are 
+  Note that TIMESTAMP_OLD_FIELDs are never created explicitly now, they are 
   left only for preserving ability to read old tables. Such fields replaced 
   with their newer analogs in CREATE TABLE and in SHOW CREATE TABLE. This is 
   because we want to prefer NONE unireg_check before TIMESTAMP_OLD_FIELD for 
@@ -4623,15 +4622,11 @@ Field_timestamp::Field_timestamp(bool ma
 }
 
 
-/*
+/**
   Get auto-set type for TIMESTAMP field.
 
-  SYNOPSIS
-    get_auto_set_type()
-
-  DESCRIPTION
-    Returns value indicating during which operations this TIMESTAMP field
-    should be auto-set to current timestamp.
+  Returns value indicating during which operations this TIMESTAMP field
+  should be auto-set to current timestamp.
 */
 timestamp_auto_set_type Field_timestamp::get_auto_set_type() const
 {
@@ -5114,7 +5109,8 @@ longlong Field_time::val_int(void)
 }
 
 
-/*
+/**
+  @note
   This function is multi-byte safe as the result string is always of type
   my_charset_bin
 */
@@ -5141,7 +5137,8 @@ String *Field_time::val_str(String *val_
 }
 
 
-/*
+/**
+  @note
   Normally we would not consider 'time' as a valid date, but we allow
   get_date() here to be able to do things like
   DATE_FORMAT(time, "%l.%i %p")
@@ -6243,15 +6240,12 @@ int Field_string::store(const char *from
 }
 
 
-/*
+/**
   Store double value in Field_string or Field_varstring.
 
-  SYNOPSIS
-    store(double nr)
-    nr            number
+  Pretty prints double number into field_length characters buffer.
 
-  DESCRIPTION
-    Pretty prints double number into field_length characters buffer.
+  @param nr            number
 */
 
 int Field_str::store(double nr)
@@ -6605,18 +6599,18 @@ int Field_string::pack_cmp(const uchar *
 }
 
 
-/*
-  Compare a packed key against row
+/**
+  Compare a packed key against row.
 
-  SYNOPSIS
-    pack_cmp()
-     key		Original key
-     length		Key length. (May be less than field length)
-     insert_or_update	1 if this is an insert or update
+  @param key		        Original key
+  @param length		Key length. (May be less than field length)
+  @param insert_or_update	1 if this is an insert or update
 
-  RETURN
+  @return
     < 0	  row < key
+  @return
     0	  row = key
+  @return
     > 0   row > key
 */
 
@@ -6859,8 +6853,9 @@ int Field_varstring::cmp_max(const uchar
 }
 
 
-/*
-  NOTE: varstring and blob keys are ALWAYS stored with a 2 byte length prefix
+/**
+  @note
+    varstring and blob keys are ALWAYS stored with a 2 byte length prefix
 */
 
 int Field_varstring::key_cmp(const uchar *key_ptr, uint max_key_length)
@@ -6880,10 +6875,10 @@ int Field_varstring::key_cmp(const uchar
 }
 
 
-/*
-  Compare to key segments (always 2 byte length prefix)
+/**
+  Compare to key segments (always 2 byte length prefix).
 
-  NOTE
+  @note
     This is used only to compare key segments created for index_read().
     (keys are created and compared in key.cc)
 */
@@ -6995,21 +6990,18 @@ uchar *Field_varstring::pack_key(uchar *
 }
 
 
-/*
+/**
   Unpack a key into a record buffer.
 
-  SYNOPSIS
-    unpack_key()
-    to                          Pointer into the record buffer.
-    key                         Pointer to the packed key.
-    max_length                  Key length limit from key description.
-
-  DESCRIPTION
-    A VARCHAR key has a maximum size of 64K-1.
-    In its packed form, the length field is one or two bytes long,
-    depending on 'max_length'.
+  A VARCHAR key has a maximum size of 64K-1.
+  In its packed form, the length field is one or two bytes long,
+  depending on 'max_length'.
+
+  @param to                          Pointer into the record buffer.
+  @param key                         Pointer to the packed key.
+  @param max_length                  Key length limit from key description.
 
-  RETURN
+  @return
     Pointer to end of 'key' (To the next key part if multi-segment key)
 */
 
@@ -7030,16 +7022,14 @@ const uchar *Field_varstring::unpack_key
   return key + length;
 }
 
-/*
-  Create a packed key that will be used for storage in the index tree
+/**
+  Create a packed key that will be used for storage in the index tree.
 
-  SYNOPSIS
-    pack_key_from_key_image()
-    to			Store packed key segment here
-    from		Key segment (as given to index_read())
-    max_length  	Max length of key
+  @param to		Store packed key segment here
+  @param from		Key segment (as given to index_read())
+  @param max_length  	Max length of key
 
-  RETURN
+  @return
     end of key storage
 */
 
@@ -7389,21 +7379,15 @@ uint32 Field_blob::get_length(const ucha
 }
 
 
-/*
+/**
   Put a blob length field into a record buffer.
 
-  SYNOPSIS
-    Field_blob::put_length()
-    pos                         Pointer into the record buffer.
-    length                      The length value to put.
-
-  DESCRIPTION
-    Depending on the maximum length of a blob, its length field is
-    put into 1 to 4 bytes. This is a property of the blob object,
-    described by 'packlength'.
+  Depending on the maximum length of a blob, its length field is
+  put into 1 to 4 bytes. This is a property of the blob object,
+  described by 'packlength'.
 
-  RETURN
-    nothing
+  @param pos                 Pointer into the record buffer.
+  @param length              The length value to put.
 */
 
 void Field_blob::put_length(uchar *pos, uint32 length)
@@ -7891,7 +7875,7 @@ int Field_blob::pack_cmp(const uchar *b,
                                           insert_or_update);
 }
 
-/* Create a packed key that will be used for storage from a MySQL row */
+/** Create a packed key that will be used for storage from a MySQL row. */
 
 uchar *Field_blob::pack_key(uchar *to, const uchar *from, uint max_length)
 {
@@ -7915,26 +7899,24 @@ uchar *Field_blob::pack_key(uchar *to, c
 }
 
 
-/*
+/**
   Unpack a blob key into a record buffer.
 
-  SYNOPSIS
-    Field_blob::unpack_key()
-    to                          Pointer into the record buffer.
-    from                        Pointer to the packed key.
-    max_length                  Key length limit from key description.
+  A blob key has a maximum size of 64K-1.
+  In its packed form, the length field is one or two bytes long,
+  depending on 'max_length'.
+  Depending on the maximum length of a blob, its length field is
+  put into 1 to 4 bytes. This is a property of the blob object,
+  described by 'packlength'.
+  Blobs are internally stored apart from the record buffer, which
+  contains a pointer to the blob buffer.
 
-  DESCRIPTION
-    A blob key has a maximum size of 64K-1.
-    In its packed form, the length field is one or two bytes long,
-    depending on 'max_length'.
-    Depending on the maximum length of a blob, its length field is
-    put into 1 to 4 bytes. This is a property of the blob object,
-    described by 'packlength'.
-    Blobs are internally stored apart from the record buffer, which
-    contains a pointer to the blob buffer.
 
-  RETURN
+  @param to                          Pointer into the record buffer.
+  @param from                        Pointer to the packed key.
+  @param max_length                  Key length limit from key description.
+
+  @return
     Pointer into 'from' past the last byte copied from packed key.
 */
 
@@ -7960,7 +7942,7 @@ const uchar *Field_blob::unpack_key(ucha
 }
 
 
-/* Create a packed key that will be used for storage from a MySQL key */
+/** Create a packed key that will be used for storage from a MySQL key. */
 
 uchar *Field_blob::pack_key_from_key_image(uchar *to, const uchar *from,
                                            uint max_length)
@@ -8181,9 +8163,10 @@ void Field_enum::store_type(ulonglong va
 }
 
 
-/*
-** Note. Storing a empty string in a enum field gives a warning
-** (if there isn't a empty value in the enum)
+/**
+  @note
+    Storing a empty string in a enum field gives a warning
+    (if there isn't a empty value in the enum)
 */
 
 int Field_enum::store(const char *from,uint length,CHARSET_INFO *cs)
@@ -8509,7 +8492,12 @@ void Field_set::sql_type(String &res) co
   res.append(')');
 }
 
-/* returns 1 if the fields are equally defined */
+/**
+  @retval
+    1  if the fields are equally defined
+  @retval
+    0  if the fields are unequally defined
+*/
 
 bool Field::eq_def(Field *field)
 {
@@ -8519,6 +8507,10 @@ bool Field::eq_def(Field *field)
   return 1;
 }
 
+/**
+  @return
+  returns 1 if the fields are equally defined
+*/
 bool Field_enum::eq_def(Field *field)
 {
   if (!Field::eq_def(field))
@@ -8537,6 +8529,10 @@ bool Field_enum::eq_def(Field *field)
   return 1;
 }
 
+/**
+  @return
+  returns 1 if the fields are equally defined
+*/
 bool Field_num::eq_def(Field *field)
 {
   if (!Field::eq_def(field))
@@ -9113,14 +9109,8 @@ void Field_bit_as_char::sql_type(String 
   Handling of field and Create_field
 *****************************************************************************/
 
-/*
-  Convert Create_field::length from number of characters to number of bytes
-
-  SYNOPSIS
-    Create_field::create_length_to_internal_length()
-  
-  DESCRIPTION
-    Convert Create_field::length from number of characters to number of bytes.
+/**
+  Convert create_field::length from number of characters to number of bytes.
 */
 
 void Create_field::create_length_to_internal_length(void)
@@ -9170,6 +9160,9 @@ void Create_field::create_length_to_inte
 }
 
 
+/**
+  Init for a tmp table field. To be extended if need be.
+*/
 void Create_field::init_for_tmp_table(enum_field_types sql_type_arg,
                                       uint32 length_arg, uint32 decimals_arg,
                                       bool maybe_null, bool is_unsigned)
@@ -9188,26 +9181,26 @@ void Create_field::init_for_tmp_table(en
 }
 
 
-/*
-  Initialize field definition for create
+/**
+  Initialize field definition for create.
 
-  SYNOPSIS
-    thd                   Thread handle
-    fld_name              Field name
-    fld_type              Field type
-    fld_length            Field length
-    fld_decimals          Decimal (if any)
-    fld_type_modifier     Additional type information
-    fld_default_value     Field default value (if any)
-    fld_on_update_value   The value of ON UPDATE clause
-    fld_comment           Field comment
-    fld_change            Field change
-    fld_interval_list     Interval list (if any)
-    fld_charset           Field charset
-    fld_geom_type         Field geometry type (if any)
+  @param thd                   Thread handle
+  @param fld_name              Field name
+  @param fld_type              Field type
+  @param fld_length            Field length
+  @param fld_decimals          Decimal (if any)
+  @param fld_type_modifier     Additional type information
+  @param fld_default_value     Field default value (if any)
+  @param fld_on_update_value   The value of ON UPDATE clause
+  @param fld_comment           Field comment
+  @param fld_change            Field change
+  @param fld_interval_list     Interval list (if any)
+  @param fld_charset           Field charset
+  @param fld_geom_type         Field geometry type (if any)
 
-  RETURN
+  @retval
     FALSE on success
+  @retval
     TRUE  on error
 */
 
@@ -9795,7 +9788,7 @@ Field *make_field(TABLE_SHARE *share, uc
 }
 
 
-/* Create a field suitable for create of table */
+/** Create a field suitable for create of table. */
 
 Create_field::Create_field(Field *old_field,Field *orig_field)
 {
@@ -9883,13 +9876,10 @@ Create_field::Create_field(Field *old_fi
 }
 
 
-/*
-  maximum possible display length for blob
-
-  SYNOPSIS
-    Field_blob::max_display_length()
+/**
+  maximum possible display length for blob.
 
-  RETURN
+  @return
     length
 */
 
@@ -9916,24 +9906,23 @@ uint32 Field_blob::max_display_length()
  Warning handling
 *****************************************************************************/
 
-/*
-  Produce warning or note about data saved into field
+/**
+  Produce warning or note about data saved into field.
 
-  SYNOPSIS
-    set_warning()
-      level            - level of message (Note/Warning/Error)
-      code             - error code of message to be produced
-      cuted_increment  - whenever we should increase cut fields count or not
+  @param level            - level of message (Note/Warning/Error)
+  @param code             - error code of message to be produced
+  @param cuted_increment  - whenever we should increase cut fields count or not
 
-  NOTE
+  @note
     This function won't produce warning and increase cut fields counter
     if count_cuted_fields == CHECK_FIELD_IGNORE for current thread.
 
     if count_cuted_fields == CHECK_FIELD_IGNORE then we ignore notes.
     This allows us to avoid notes in optimisation, like convert_constant_item().
 
-  RETURN VALUE
+  @retval
     1 if count_cuted_fields == CHECK_FIELD_IGNORE and error level is not NOTE
+  @retval
     0 otherwise
 */
 
@@ -9957,21 +9946,19 @@ Field::set_warning(MYSQL_ERROR::enum_war
 }
 
 
-/*
-  Produce warning or note about datetime string data saved into field
+/**
+  Produce warning or note about datetime string data saved into field.
 
-  SYNOPSIS
-    set_datime_warning()
-      level            - level of message (Note/Warning/Error)
-      code             - error code of message to be produced
-      str              - string value which we tried to save
-      str_len          - length of string which we tried to save
-      ts_type          - type of datetime value (datetime/date/time)
-      cuted_increment  - whenever we should increase cut fields count or not
-  
-  NOTE
-    This function will always produce some warning but won't increase cut 
-    fields counter if count_cuted_fields == FIELD_CHECK_IGNORE for current 
+  @param level            level of message (Note/Warning/Error)
+  @param code             error code of message to be produced
+  @param str              string value which we tried to save
+  @param str_length       length of string which we tried to save
+  @param ts_type          type of datetime value (datetime/date/time)
+  @param cuted_increment  whenever we should increase cut fields count or not
+
+  @note
+    This function will always produce some warning but won't increase cut
+    fields counter if count_cuted_fields ==FIELD_CHECK_IGNORE for current
     thread.
 */
 
@@ -9989,20 +9976,18 @@ Field::set_datetime_warning(MYSQL_ERROR:
 }
 
 
-/*
-  Produce warning or note about integer datetime value saved into field
+/**
+  Produce warning or note about integer datetime value saved into field.
 
-  SYNOPSIS
-    set_warning()
-      level            - level of message (Note/Warning/Error)
-      code             - error code of message to be produced
-      nr               - numeric value which we tried to save
-      ts_type          - type of datetime value (datetime/date/time)
-      cuted_increment  - whenever we should increase cut fields count or not
-  
-  NOTE
-    This function will always produce some warning but won't increase cut 
-    fields counter if count_cuted_fields == FIELD_CHECK_IGNORE for current 
+  @param level            level of message (Note/Warning/Error)
+  @param code             error code of message to be produced
+  @param nr               numeric value which we tried to save
+  @param ts_type          type of datetime value (datetime/date/time)
+  @param cuted_increment  whenever we should increase cut fields count or not
+
+  @note
+    This function will always produce some warning but won't increase cut
+    fields counter if count_cuted_fields == FIELD_CHECK_IGNORE for current
     thread.
 */
 
@@ -10023,19 +10008,17 @@ Field::set_datetime_warning(MYSQL_ERROR:
 }
 
 
-/*
-  Produce warning or note about double datetime data saved into field
+/**
+  Produce warning or note about double datetime data saved into field.
 
-  SYNOPSIS
-    set_warning()
-      level            - level of message (Note/Warning/Error)
-      code             - error code of message to be produced
-      nr               - double value which we tried to save
-      ts_type          - type of datetime value (datetime/date/time)
-  
-  NOTE
-    This function will always produce some warning but won't increase cut 
-    fields counter if count_cuted_fields == FIELD_CHECK_IGNORE for current 
+  @param level            level of message (Note/Warning/Error)
+  @param code             error code of message to be produced
+  @param nr               double value which we tried to save
+  @param ts_type          type of datetime value (datetime/date/time)
+
+  @note
+    This function will always produce some warning but won't increase cut
+    fields counter if count_cuted_fields == FIELD_CHECK_IGNORE for current
     thread.
 */
 
Thread
bk commit into 5.1 tree (cmiller:1.2583)Chad MILLER9 Oct