diff options
author | Michael Widenius <monty@askmonty.org> | 2009-11-02 11:30:21 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2009-11-02 11:30:21 +0200 |
commit | a6793a48e20c2aebb1391e2f4f916cf147ff1900 (patch) | |
tree | f241da438a318bfb759616cc7e400ed0d315b5a4 | |
parent | 51186f1d3d38d4fbd4e9f0ff1a67c78ea9920fbf (diff) | |
download | mariadb-git-a6793a48e20c2aebb1391e2f4f916cf147ff1900.tar.gz |
Fixed problem with schema tables and DECIMAL
sql/sql_show.cc:
Change decimal item to type holder, to be able to define the decimals and max_length for the DECIMAL
field from the schema specification instead of the value of the item.
-rw-r--r-- | sql/sql_show.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index bd9e1fb5c72..0601aa976b8 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -5608,6 +5608,12 @@ TABLE *create_schema_table(THD *thd, TABLE_LIST *table_list) { DBUG_RETURN(0); } + /* + Create a type holder, as we want the type of the item to defined + the type of the object, not the value + */ + if (!(item= new Item_type_holder(thd, item))) + DBUG_RETURN(0); item->unsigned_flag= (fields_info->field_flags & MY_I_S_UNSIGNED); item->decimals= fields_info->field_length%10; item->max_length= (fields_info->field_length/100)%100; |