diff options
author | unknown <cmiller@zippy.cornsilk.net> | 2007-11-14 15:11:58 -0500 |
---|---|---|
committer | unknown <cmiller@zippy.cornsilk.net> | 2007-11-14 15:11:58 -0500 |
commit | c1a36d80ef50b7cd23da893a08e7610d9e9dd02e (patch) | |
tree | 413750c08da07f9695b1935432266bfa83cc4f4b /sql/sql_show.cc | |
parent | a49d3f018b9562e847578d06766ced772519a333 (diff) | |
download | mariadb-git-c1a36d80ef50b7cd23da893a08e7610d9e9dd02e.tar.gz |
Push history-limiting code until after the code that adds new
history entries. Lazy deletion isn't smart or useful here.
Backport from 5.1 .
include/my_sys.h:
Prepare for rename in 5.1.
mysql-test/r/profiling.result:
Backport tests from 5.1.
mysql-test/t/profiling.test:
Backport tests from 5.1.
sql/mysql_priv.h:
Backport changes from 5.1 .
sql/sp_head.cc:
Backport changes from 5.1 .
sql/sql_class.cc:
Backport changes from 5.1 .
sql/sql_parse.cc:
Backport changes from 5.1 .
sql/sql_profile.cc:
Push history-limiting code until after the code that adds new
history entries. Lazy deletion isn't smart or useful here.
Correct for 5.0 member existance and execution.
sql/sql_profile.h:
Backport changes from 5.1 .
sql/sql_show.cc:
Backport changes from 5.1 .
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index cd5b537996d..1eb6838d98e 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -3622,6 +3622,14 @@ ST_SCHEMA_TABLE *get_schema_table(enum enum_schema_tables schema_table_idx) /* Create information_schema table using schema_table data + @note + For MYSQL_TYPE_DECIMAL fields only, the field_length member has encoded + into it two numbers, based on modulus of base-10 numbers. In the ones + position is the number of decimals. Tens position is unused. In the + hundreds and thousands position is a two-digit decimal number representing + length. Encode this value with (decimals*100)+length , where + 0<decimals<10 and 0<=length<100 . + SYNOPSIS create_schema_table() thd thread handler @@ -3667,6 +3675,19 @@ TABLE *create_schema_table(THD *thd, TABLE_LIST *table_list) DBUG_RETURN(NULL); break; case MYSQL_TYPE_DECIMAL: + if (!(item= new Item_decimal((longlong) fields_info->value, false))) + { + DBUG_RETURN(0); + } + item->decimals= fields_info->field_length%10; + item->max_length= (fields_info->field_length/100)%100; + if (item->unsigned_flag == 0) + item->max_length+= 1; + if (item->decimals > 0) + item->max_length+= 1; + item->set_name(fields_info->field_name, + strlen(fields_info->field_name), cs); + break; case MYSQL_TYPE_STRING: default: /* Don't let unimplemented types pass through. Could be a grave error. */ |