← Back to team overview

maria-developers team mailing list archive

bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (monty:2748)

 

#At lp:maria based on revid:knielsen@xxxxxxxxxxxxxxx-20091016150136-qeazrj6znra8k9tt

 2748 Michael Widenius	2009-11-02
      Fixed problem with schema tables and DECIMAL
      modified:
        sql/sql_show.cc

per-file messages:
  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.
=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc	2009-10-15 21:38:29 +0000
+++ b/sql/sql_show.cc	2009-11-02 09:30:21 +0000
@@ -5608,6 +5608,12 @@ TABLE *create_schema_table(THD *thd, TAB
       {
         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;