#At lp:maria based on 
revid:[email protected]

 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;


_______________________________________________
Mailing list: https://launchpad.net/~maria-developers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to