From: Date: March 7 2008 12:39pm Subject: bk commit into 5.1 tree (mhansson:1.2573) BUG#34367 List-Archive: http://lists.mysql.com/commits/43584 X-Bug: 34367 Message-Id: <200803071139.m27BdbTH021440@riffraff> Below is the list of changes that have just been committed into a local 5.1 repository of mhansson. When mhansson 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, 2008-03-07 12:38:34+01:00, mhansson@riffraff.(none) +2 -0 Bug #34367: sql/sql_show.cc: create_schema_table should handle MYSQL_TYPE_NEWDECIMAL Added support for the type MYSQL_TYPE_NEWDECIMAL. It now works like MYSQL_TYPE_DECIMAL. Unfortunately there cannot be a test case until we have a working information_schema plugin as part of the source distribution. sql/sql_show.cc@stripped, 2008-03-07 12:38:32+01:00, mhansson@riffraff.(none) +5 -3 Bug#34367: The fix. Corrected wrong comments and a DBUG_ENTER with wrong function name. sql/table.h@stripped, 2008-03-07 12:38:32+01:00, mhansson@riffraff.(none) +24 -0 Bug#34367: Added comments to st_field_info. diff -Nrup a/sql/sql_show.cc b/sql/sql_show.cc --- a/sql/sql_show.cc 2008-02-01 11:50:18 +01:00 +++ b/sql/sql_show.cc 2008-03-07 12:38:32 +01:00 @@ -5384,8 +5384,9 @@ ST_SCHEMA_TABLE *get_schema_table(enum e @param thd thread handler - @param - schema_table pointer to 'shema_tables' element + + @param table_list Used to pass I_S table information(fields info, tables + parameters etc) and table name. @retval \# Pointer to created table @retval NULL Can't create table @@ -5436,6 +5437,7 @@ TABLE *create_schema_table(THD *thd, TAB DBUG_RETURN(NULL); break; case MYSQL_TYPE_DECIMAL: + case MYSQL_TYPE_NEWDECIMAL: if (!(item= new Item_decimal((longlong) fields_info->value, false))) { DBUG_RETURN(0); @@ -5785,7 +5787,7 @@ int make_schema_select(THD *thd, SELECT_ { ST_SCHEMA_TABLE *schema_table= get_schema_table(schema_table_idx); LEX_STRING db, table; - DBUG_ENTER("mysql_schema_select"); + DBUG_ENTER("make_schema_select"); DBUG_PRINT("enter", ("mysql_schema_select: %s", schema_table->table_name)); /* We have to make non const db_name & table_name diff -Nrup a/sql/table.h b/sql/table.h --- a/sql/table.h 2007-12-20 21:24:07 +01:00 +++ b/sql/table.h 2008-03-07 12:38:32 +01:00 @@ -759,12 +759,36 @@ enum enum_schema_tables typedef struct st_field_info { + /** + This is used as column name. + */ const char* field_name; + /** + For string-type columns, this is the maximum number of + characters. Otherwise, it is the 'display-length' for the column. + */ uint field_length; + /** + This denotes data type for the column. For the most part, there seems to + be one entry in the enum for each SQL data type, although there seem to + be a number of additional entries in the enum. + */ enum enum_field_types field_type; int value; + /** + This is used to set column attributes. By default, columns are @c NOT + @c NULL and @c SIGNED, and you can deviate from the default + by setting the appopriate flags. You can use either one of the flags + @c MY_I_S_MAYBE_NULL and @cMY_I_S_UNSIGNED or + combine them using the bitwise or operator @c |. Both flags are + defined in table.h. + */ uint field_flags; // Field atributes(maybe_null, signed, unsigned etc.) const char* old_name; + /** + This should be one of @c SKIP_OPEN_TABLE, + @c OPEN_FRM_ONLY or @c OPEN_FULL_TABLE. + */ uint open_method; } ST_FIELD_INFO;