List:Internals« Previous MessageNext Message »
From:SGreen Date:September 29 2005 8:40pm
Subject:Re: bk commit into 5.1 tree (stewart:1.2030)
View as plain text  
Stewart Smith <stewart@stripped> wrote on 09/29/2005 02:08:29 AM:

> Below is the list of changes that have just been committed into a local
> 5.1 repository of stewart. When stewart 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.2030 05/09/29 16:08:23 stewart@stripped +12 -0
>   WL#2076 Add extra statistics for ndb processes
> 
>   add and implement INFORMATION_SCHEMA.TABLESPACES
> 
>   currently lists tablespaces in NDB.
> 
>   Need to check if there's any existing standard on the content of a
> table like this.
> 
> +ST_FIELD_INFO tablespaces_fields_info[]=
> +{
> +  {"NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
> +  {"ENGINE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
> +  {"VERSION", 1, MYSQL_TYPE_LONG, 0, 0, 0},
> +  {"EXTENT_SIZE", 1, MYSQL_TYPE_LONG, 0, 0, 0},
> +  {"DEFAULT_LOGFILE_GROUP", 1, MYSQL_TYPE_LONG, 0, 0, 0},
> +  {0, 0, MYSQL_TYPE_STRING, 0, 0, 0}
> +};
> +
> +ST_FIELD_INFO datafiles_fields_info[]=
> +{
> +  {"NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
> +  {"ENGINE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
> +  {"PATH", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
> +  {"SIZE", 1, MYSQL_TYPE_LONG, 0, 0, 0},
> +  {"FREE", 1, MYSQL_TYPE_LONG, 0, 0, 0},
> +  {"TABLESPACE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
> +  {0, 0, MYSQL_TYPE_STRING, 0, 0, 0}
> +};
> 
>  /*
>    Description of ST_FIELD_INFO in table.h
> @@ -4126,6 +4168,10 @@
>      get_all_tables, 0, get_schema_views_record, 1, 2, 0},
>    {"USER_PRIVILEGES", user_privileges_fields_info, create_schema_table, 

>      fill_schema_user_privileges, 0, 0, -1, -1, 0},
> +  {"TABLESPACES", tablespaces_fields_info, create_schema_table,
> +   fill_schema_tablespaces, 0, 0, -1, -1, 0},
> +  {"DATAFILES", datafiles_fields_info, create_schema_table,
> +   fill_schema_datafiles, 0, 0, -1, -1, 0},
>    {0, 0, 0, 0, 0, 0, 0, 0, 0}
>  };
> 

I checked  Part 11 of the SQL2003 standard (ISO/IEC 9075-11:2003 (E)) and 
didn't any INFORMATION_SCHEMA views for TABLESPACES or DATAFILES. Both 
seem to be rather implementation-specific sets of metadata. Does any other 
RDBMS product use the concept of a "tablespace"? If they did, do they 
expose that information through an INFORMATION_SCHEMA view? I couldn't 
think of any.

So... as long as it looks good, and nobody can cite another reference I 
might have missed, you have just created the standard by which all other 
implementations will be judged :-)

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

Thread
bk commit into 5.1 tree (stewart:1.2030)Stewart Smith29 Sep
  • Re: bk commit into 5.1 tree (stewart:1.2030)SGreen29 Sep
    • Re: bk commit into 5.1 tree (stewart:1.2030)Stewart Smith30 Sep