MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:jani Date:September 13 2005 3:11pm
Subject:bk commit into 4.1 tree (jani:1.2433)
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of jani. When jani 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.2433 05/09/13 18:11:51 jani@stripped +1 -0
  Merged code. Removed unneccessary repeating.
  

  sql/sql_analyse.cc
    1.54 05/09/13 18:11:47 jani@stripped +8 -10
    Merged code. Removed unneccessary repeating.
    

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jani
# Host:	ua141d10.elisa.omakaista.fi
# Root:	/home/my/bk/mysql-4.1

--- 1.53/sql/sql_analyse.cc	2005-09-09 17:29:52 +03:00
+++ 1.54/sql/sql_analyse.cc	2005-09-13 18:11:47 +03:00
@@ -788,24 +788,22 @@
 
   if (!max_notzero_dec_len)
   {
+    int len= (int) max_length - ((item->decimals == NOT_FIXED_DEC) ?
+				 0 : (item->decimals + 1));
+
     if (min_arg >= -128 && max_arg <= (min_arg >= 0 ? 255 : 127))
-      sprintf(buff, "TINYINT(%d)", (int) max_length -
-	      ((item->decimals == NOT_FIXED_DEC) ? 0 : (item->decimals + 1)));
+      sprintf(buff, "TINYINT(%d)", len);
     else if (min_arg >= INT_MIN16 && max_arg <= (min_arg >= 0 ?
 						 UINT_MAX16 : INT_MAX16))
-      sprintf(buff, "SMALLINT(%d)", (int) max_length -
-	      ((item->decimals == NOT_FIXED_DEC) ? 0 : (item->decimals + 1)));
+      sprintf(buff, "SMALLINT(%d)", len);
     else if (min_arg >= INT_MIN24 && max_arg <= (min_arg >= 0 ?
 						 UINT_MAX24 : INT_MAX24))
-      sprintf(buff, "MEDIUMINT(%d)", (int) max_length -
-	      ((item->decimals == NOT_FIXED_DEC) ? 0 : (item->decimals + 1)));
+      sprintf(buff, "MEDIUMINT(%d)", len);
     else if (min_arg >= INT_MIN32 && max_arg <= (min_arg >= 0 ?
 						 UINT_MAX32 : INT_MAX32))
-      sprintf(buff, "INT(%d)", (int) max_length -
-	      ((item->decimals == NOT_FIXED_DEC) ? 0 : (item->decimals + 1)));
+      sprintf(buff, "INT(%d)", len);
     else
-      sprintf(buff, "BIGINT(%d)", (int) max_length -
-	      ((item->decimals == NOT_FIXED_DEC) ? 0 : (item->decimals + 1)));
+      sprintf(buff, "BIGINT(%d)", len);
     answer->append(buff, (uint) strlen(buff));
     if (min_arg >= 0)
       answer->append(" UNSIGNED");
Thread
bk commit into 4.1 tree (jani:1.2433)jani13 Sep