MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:gluh Date:April 18 2007 11:13am
Subject:bk commit into 5.1 tree (gluh:1.2563) BUG#27047
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of gluh. When gluh 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@stripped, 2007-04-18 16:13:53+05:00, gluh@stripped +5 -0
  Bug#27047 INFORMATION_SCHEMA table cannot have BIGINT fields
  added support for DATE, TIME, BLOB, FLOAT and all *INT variants in I_S tables

  mysql-test/r/information_schema.result@stripped, 2007-04-18 16:13:51+05:00, gluh@stripped +3 -3
    result fix

  mysql-test/r/show_check.result@stripped, 2007-04-18 16:13:51+05:00, gluh@stripped +4 -4
    result fix

  sql/item.h@stripped, 2007-04-18 16:13:51+05:00, gluh@stripped +34 -10
    added support for DATE, TIME, BLOB, FLOAT and all *INT variants in I_S tables

  sql/sp.cc@stripped, 2007-04-18 16:13:51+05:00, gluh@stripped +3 -1
    added support for DATE, TIME, BLOB, FLOAT and all *INT variants in I_S tables

  sql/sql_show.cc@stripped, 2007-04-18 16:13:51+05:00, gluh@stripped +110 -85
    added support for DATE, TIME, BLOB, FLOAT and all *INT variants in I_S tables

# 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:	gluh
# Host:	eagle.(none)
# Root:	/home/gluh/MySQL/Bugs/5.1.27047

--- 1.237/sql/item.h	2007-04-04 14:38:05 +05:00
+++ 1.238/sql/item.h	2007-04-18 16:13:51 +05:00
@@ -1841,33 +1841,57 @@ public:
 
 
 /* for show tables */
-
-class Item_datetime :public Item_string
+class Item_partition_func_safe_string: public Item_string
 {
 public:
-  Item_datetime(const char *item_name): Item_string(item_name,"",0,
-                                                    &my_charset_bin)
-  { max_length=19;}
-  enum_field_types field_type() const { return MYSQL_TYPE_DATETIME; }
+  Item_partition_func_safe_string(const char *name, uint length,
+                                  CHARSET_INFO *cs= NULL):
+    Item_string(name, length, cs)
+  {}
   bool check_partition_func_processor(byte *int_arg) {return TRUE;}
 };
 
-class Item_empty_string :public Item_string
+
+class Item_return_date_time :public Item_partition_func_safe_string
+{
+  enum_field_types date_time_field_type;
+public:
+  Item_return_date_time(const char *name_arg, enum_field_types field_type_arg)
+    :Item_partition_func_safe_string(name_arg, 0, &my_charset_bin),
+     date_time_field_type(field_type_arg)
+  { }
+  enum_field_types field_type() const { return date_time_field_type; }
+};
+
+
+class Item_blob :public Item_partition_func_safe_string
+{
+public:
+  Item_blob(const char *name, uint length) :
+    Item_partition_func_safe_string(name, length, &my_charset_bin)
+  { max_length= length; }
+  enum Type type() const { return TYPE_HOLDER; }
+  enum_field_types field_type() const { return MYSQL_TYPE_BLOB; }
+};
+
+
+class Item_empty_string :public Item_partition_func_safe_string
 {
 public:
   Item_empty_string(const char *header,uint length, CHARSET_INFO *cs= NULL) :
-    Item_string("",0, cs ? cs : &my_charset_bin)
+    Item_partition_func_safe_string("",0, cs ? cs : &my_charset_bin)
     { name=(char*) header; max_length= cs ? length * cs->mbmaxlen : length; }
   void make_field(Send_field *field);
 };
 
+
 class Item_return_int :public Item_int
 {
   enum_field_types int_field_type;
 public:
   Item_return_int(const char *name_arg, uint length,
-		  enum_field_types field_type_arg)
-    :Item_int(name_arg, 0, length), int_field_type(field_type_arg)
+		  enum_field_types field_type_arg, longlong value= 0)
+    :Item_int(name_arg, value, length), int_field_type(field_type_arg)
   {
     unsigned_flag=1;
   }

--- 1.403/sql/sql_show.cc	2007-04-05 21:50:21 +05:00
+++ 1.404/sql/sql_show.cc	2007-04-18 16:13:51 +05:00
@@ -4690,16 +4690,25 @@ TABLE *create_schema_table(THD *thd, TAB
   for (; fields_info->field_name; fields_info++)
   {
     switch (fields_info->field_type) {
+    case MYSQL_TYPE_TINY
     case MYSQL_TYPE_LONG:
-      if (!(item= new Item_int(fields_info->field_name,
-                               fields_info->value,
-                               fields_info->field_length)))
+    case MYSQL_TYPE_SHORT:
+    case MYSQL_TYPE_LONGLONG:
+    case MYSQL_TYPE_INT24:
+      if (!(item= new Item_return_int(fields_info->field_name,
+                                      fields_info->field_length,
+                                      fields_info->field_type,
+                                      fields_info->value)))
       {
         DBUG_RETURN(0);
       }
       break;
+    case MYSQL_TYPE_DATE:
+    case MYSQL_TYPE_TIME:
     case MYSQL_TYPE_TIMESTAMP:
-      if (!(item=new Item_datetime(fields_info->field_name)))
+    case MYSQL_TYPE_DATETIME:
+      if (!(item=new Item_return_date_time(fields_info->field_name,
+                                           fields_info->field_type)))
       {
         DBUG_RETURN(0);
       }
@@ -4725,6 +4734,16 @@ TABLE *create_schema_table(THD *thd, TAB
       item->set_name(fields_info->field_name,
                      strlen(fields_info->field_name), cs);
       break;
+    case MYSQL_TYPE_TINY_BLOB:
+    case MYSQL_TYPE_MEDIUM_BLOB:
+    case MYSQL_TYPE_LONG_BLOB:
+    case MYSQL_TYPE_BLOB:
+      if (!(item= new Item_blob(fields_info->field_name,
+                                fields_info->field_length)))
+      {
+        DBUG_RETURN(0);
+      }
+      break;
     default:
       /* Don't let unimplemented types pass through. Could be a grave error. */
       DBUG_ASSERT(fields_info->field_type == MYSQL_TYPE_STRING);
@@ -5360,25 +5379,27 @@ ST_FIELD_INFO tables_fields_info[]=
   {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Name"},
   {"TABLE_TYPE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
   {"ENGINE", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, "Engine"},
-  {"VERSION", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONG, 0, 1, "Version"},
+  {"VERSION", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONGLONG,0,1, "Version"},
   {"ROW_FORMAT", 10, MYSQL_TYPE_STRING, 0, 1, "Row_format"},
-  {"TABLE_ROWS", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONG, 0, 1, "Rows"},
-  {"AVG_ROW_LENGTH", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONG, 0, 1,
+  {"TABLE_ROWS", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG, 0, 1, "Rows"},
+  {"AVG_ROW_LENGTH", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONGLONG, 0, 1,
    "Avg_row_length"},
-  {"DATA_LENGTH", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONG, 0, 1,
+  {"DATA_LENGTH", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONGLONG, 0, 1,
    "Data_length"},
-  {"MAX_DATA_LENGTH", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONG, 0, 1,
+  {"MAX_DATA_LENGTH", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONGLONG, 0, 1,
    "Max_data_length"},
-  {"INDEX_LENGTH", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONG, 0, 1,
+  {"INDEX_LENGTH", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONGLONG, 0, 1,
    "Index_length"},
-  {"DATA_FREE", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONG, 0, 1, "Data_free"},
-  {"AUTO_INCREMENT", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONG, 0, 1,
+  {"DATA_FREE", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONGLONG, 0, 1,
+   "Data_free"},
+  {"AUTO_INCREMENT", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONGLONG, 0, 1,
    "Auto_increment"},
-  {"CREATE_TIME", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, "Create_time"},
-  {"UPDATE_TIME", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, "Update_time"},
-  {"CHECK_TIME", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, "Check_time"},
+  {"CREATE_TIME", 0, MYSQL_TYPE_DATETIME, 0, 1, "Create_time"},
+  {"UPDATE_TIME", 0, MYSQL_TYPE_DATETIME, 0, 1, "Update_time"},
+  {"CHECK_TIME", 0, MYSQL_TYPE_DATETIME, 0, 1, "Check_time"},
   {"TABLE_COLLATION", 64, MYSQL_TYPE_STRING, 0, 1, "Collation"},
-  {"CHECKSUM", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONG, 0, 1, "Checksum"},
+  {"CHECKSUM", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONGLONG, 0, 1,
+   "Checksum"},
   {"CREATE_OPTIONS", 255, MYSQL_TYPE_STRING, 0, 1, "Create_options"},
   {"TABLE_COMMENT", 80, MYSQL_TYPE_STRING, 0, 0, "Comment"},
   {0, 0, MYSQL_TYPE_STRING, 0, 0, 0}
@@ -5391,15 +5412,18 @@ ST_FIELD_INFO columns_fields_info[]=
   {"TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
   {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
   {"COLUMN_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Field"},
-  {"ORDINAL_POSITION", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONG, 0, 0, 0},
-  {"COLUMN_DEFAULT", MAX_FIELD_VARCHARLENGTH, MYSQL_TYPE_STRING, 0, 1, "Default"},
+  {"ORDINAL_POSITION", MY_INT64_NUM_DECIMAL_DIGITS ,
+   MYSQL_TYPE_LONGLONG, 0, 0, 0},
+  {"COLUMN_DEFAULT", MAX_FIELD_VARCHARLENGTH, MYSQL_TYPE_STRING, 0,1, "Default"},
   {"IS_NULLABLE", 3, MYSQL_TYPE_STRING, 0, 0, "Null"},
   {"DATA_TYPE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
-  {"CHARACTER_MAXIMUM_LENGTH", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONG, 0, 1,
-   0},
-  {"CHARACTER_OCTET_LENGTH", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONG, 0, 1, 0},
-  {"NUMERIC_PRECISION", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONG, 0, 1, 0},
-  {"NUMERIC_SCALE", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONG, 0, 1, 0},
+  {"CHARACTER_MAXIMUM_LENGTH", MY_INT64_NUM_DECIMAL_DIGITS ,
+   MYSQL_TYPE_LONGLONG, 0, 1, 0},
+  {"CHARACTER_OCTET_LENGTH", MY_INT64_NUM_DECIMAL_DIGITS ,
+   MYSQL_TYPE_LONGLONG, 0, 1, 0},
+  {"NUMERIC_PRECISION", MY_INT64_NUM_DECIMAL_DIGITS,
+   MYSQL_TYPE_LONGLONG, 0, 1, 0},
+  {"NUMERIC_SCALE", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG, 0, 1, 0},
   {"CHARACTER_SET_NAME", 64, MYSQL_TYPE_STRING, 0, 1, 0},
   {"COLLATION_NAME", 64, MYSQL_TYPE_STRING, 0, 1, "Collation"},
   {"COLUMN_TYPE", 65535, MYSQL_TYPE_STRING, 0, 0, "Type"},
@@ -5416,7 +5440,7 @@ ST_FIELD_INFO charsets_fields_info[]=
   {"CHARACTER_SET_NAME", 64, MYSQL_TYPE_STRING, 0, 0, "Charset"},
   {"DEFAULT_COLLATE_NAME", 64, MYSQL_TYPE_STRING, 0, 0, "Default collation"},
   {"DESCRIPTION", 60, MYSQL_TYPE_STRING, 0, 0, "Description"},
-  {"MAXLEN", 3 ,MYSQL_TYPE_LONG, 0, 0, "Maxlen"},
+  {"MAXLEN", 3, MYSQL_TYPE_LONGLONG, 0, 0, "Maxlen"},
   {0, 0, MYSQL_TYPE_STRING, 0, 0, 0}
 };
 
@@ -5425,10 +5449,10 @@ ST_FIELD_INFO collation_fields_info[]=
 {
   {"COLLATION_NAME", 64, MYSQL_TYPE_STRING, 0, 0, "Collation"},
   {"CHARACTER_SET_NAME", 64, MYSQL_TYPE_STRING, 0, 0, "Charset"},
-  {"ID", MY_INT32_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONG, 0, 0, "Id"},
+  {"ID", MY_INT32_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG, 0, 0, "Id"},
   {"IS_DEFAULT", 3, MYSQL_TYPE_STRING, 0, 0, "Default"},
   {"IS_COMPILED", 3, MYSQL_TYPE_STRING, 0, 0, "Compiled"},
-  {"SORTLEN", 3 ,MYSQL_TYPE_LONG, 0, 0, "Sortlen"},
+  {"SORTLEN", 3, MYSQL_TYPE_LONGLONG, 0, 0, "Sortlen"},
   {0, 0, MYSQL_TYPE_STRING, 0, 0, 0}
 };
 
@@ -5455,19 +5479,19 @@ ST_FIELD_INFO events_fields_info[]=
   {"EVENT_BODY", 8, MYSQL_TYPE_STRING, 0, 0, 0},
   {"EVENT_DEFINITION", 65535, MYSQL_TYPE_STRING, 0, 0, 0},
   {"EVENT_TYPE", 9, MYSQL_TYPE_STRING, 0, 0, "Type"},
-  {"EXECUTE_AT", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, "Execute at"},
+  {"EXECUTE_AT", 0, MYSQL_TYPE_DATETIME, 0, 1, "Execute at"},
   {"INTERVAL_VALUE", 256, MYSQL_TYPE_STRING, 0, 1, "Interval value"},
   {"INTERVAL_FIELD", 18, MYSQL_TYPE_STRING, 0, 1, "Interval field"},
   {"SQL_MODE", 65535, MYSQL_TYPE_STRING, 0, 0, 0},
-  {"STARTS", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, "Starts"},
-  {"ENDS", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, "Ends"},
+  {"STARTS", 0, MYSQL_TYPE_DATETIME, 0, 1, "Starts"},
+  {"ENDS", 0, MYSQL_TYPE_DATETIME, 0, 1, "Ends"},
   {"STATUS", 18, MYSQL_TYPE_STRING, 0, 0, "Status"}, 
   {"ON_COMPLETION", 12, MYSQL_TYPE_STRING, 0, 0, 0},
-  {"CREATED", 0, MYSQL_TYPE_TIMESTAMP, 0, 0, 0},
-  {"LAST_ALTERED", 0, MYSQL_TYPE_TIMESTAMP, 0, 0, 0},
-  {"LAST_EXECUTED", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, 0},
+  {"CREATED", 0, MYSQL_TYPE_DATETIME, 0, 0, 0},
+  {"LAST_ALTERED", 0, MYSQL_TYPE_DATETIME, 0, 0, 0},
+  {"LAST_EXECUTED", 0, MYSQL_TYPE_DATETIME, 0, 1, 0},
   {"EVENT_COMMENT", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
-  {"ORIGINATOR", 10, MYSQL_TYPE_LONG, 0, 0, "Originator"}, 
+  {"ORIGINATOR", 10, MYSQL_TYPE_LONGLONG, 0, 0, "Originator"}, 
   {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} 
 };
 
@@ -5498,8 +5522,8 @@ ST_FIELD_INFO proc_fields_info[]=
   {"SQL_DATA_ACCESS", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
   {"SQL_PATH", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
   {"SECURITY_TYPE", 7, MYSQL_TYPE_STRING, 0, 0, "Security_type"},
-  {"CREATED", 0, MYSQL_TYPE_TIMESTAMP, 0, 0, "Created"},
-  {"LAST_ALTERED", 0, MYSQL_TYPE_TIMESTAMP, 0, 0, "Modified"},
+  {"CREATED", 0, MYSQL_TYPE_DATETIME, 0, 0, "Created"},
+  {"LAST_ALTERED", 0, MYSQL_TYPE_DATETIME, 0, 0, "Modified"},
   {"SQL_MODE", 65535, MYSQL_TYPE_STRING, 0, 0, 0},
   {"ROUTINE_COMMENT", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Comment"},
   {"DEFINER", 77, MYSQL_TYPE_STRING, 0, 0, "Definer"},
@@ -5512,14 +5536,15 @@ ST_FIELD_INFO stat_fields_info[]=
   {"TABLE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0},
   {"TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
   {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Table"},
-  {"NON_UNIQUE", 1, MYSQL_TYPE_LONG, 0, 0, "Non_unique"},
+  {"NON_UNIQUE", 1, MYSQL_TYPE_LONGLONG, 0, 0, "Non_unique"},
   {"INDEX_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
   {"INDEX_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Key_name"},
-  {"SEQ_IN_INDEX", 2, MYSQL_TYPE_LONG, 0, 0, "Seq_in_index"},
+  {"SEQ_IN_INDEX", 2, MYSQL_TYPE_LONGLONG, 0, 0, "Seq_in_index"},
   {"COLUMN_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Column_name"},
   {"COLLATION", 1, MYSQL_TYPE_STRING, 0, 1, "Collation"},
-  {"CARDINALITY", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONG, 0, 1, "Cardinality"},
-  {"SUB_PART", 3, MYSQL_TYPE_LONG, 0, 1, "Sub_part"},
+  {"CARDINALITY", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG, 0, 1,
+   "Cardinality"},
+  {"SUB_PART", 3, MYSQL_TYPE_LONGLONG, 0, 1, "Sub_part"},
   {"PACKED", 10, MYSQL_TYPE_STRING, 0, 1, "Packed"},
   {"NULLABLE", 3, MYSQL_TYPE_STRING, 0, 0, "Null"},
   {"INDEX_TYPE", 16, MYSQL_TYPE_STRING, 0, 0, "Index_type"},
@@ -5609,8 +5634,8 @@ ST_FIELD_INFO key_column_usage_fields_in
   {"TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
   {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
   {"COLUMN_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
-  {"ORDINAL_POSITION", 10 ,MYSQL_TYPE_LONG, 0, 0, 0},
-  {"POSITION_IN_UNIQUE_CONSTRAINT", 10 ,MYSQL_TYPE_LONG, 0, 1, 0},
+  {"ORDINAL_POSITION", 10, MYSQL_TYPE_LONGLONG, 0, 0, 0},
+  {"POSITION_IN_UNIQUE_CONSTRAINT", 10, MYSQL_TYPE_LONGLONG, 0, 1, 0},
   {"REFERENCED_TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
   {"REFERENCED_TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
   {"REFERENCED_COLUMN_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
@@ -5632,8 +5657,8 @@ ST_FIELD_INFO open_tables_fields_info[]=
 {
   {"Database", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Database"},
   {"Table",NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Table"},
-  {"In_use", 1, MYSQL_TYPE_LONG, 0, 0, "In_use"},
-  {"Name_locked", 4, MYSQL_TYPE_LONG, 0, 0, "Name_locked"},
+  {"In_use", 1, MYSQL_TYPE_LONGLONG, 0, 0, "In_use"},
+  {"Name_locked", 4, MYSQL_TYPE_LONGLONG, 0, 0, "Name_locked"},
   {0, 0, MYSQL_TYPE_STRING, 0, 0, 0}
 };
 
@@ -5647,7 +5672,7 @@ ST_FIELD_INFO triggers_fields_info[]=
   {"EVENT_OBJECT_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0},
   {"EVENT_OBJECT_SCHEMA",NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
   {"EVENT_OBJECT_TABLE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Table"},
-  {"ACTION_ORDER", 4, MYSQL_TYPE_LONG, 0, 0, 0},
+  {"ACTION_ORDER", 4, MYSQL_TYPE_LONGLONG, 0, 0, 0},
   {"ACTION_CONDITION", 65535, MYSQL_TYPE_STRING, 0, 1, 0},
   {"ACTION_STATEMENT", 65535, MYSQL_TYPE_STRING, 0, 0, "Statement"},
   {"ACTION_ORIENTATION", 9, MYSQL_TYPE_STRING, 0, 0, 0},
@@ -5656,7 +5681,7 @@ ST_FIELD_INFO triggers_fields_info[]=
   {"ACTION_REFERENCE_NEW_TABLE", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
   {"ACTION_REFERENCE_OLD_ROW", 3, MYSQL_TYPE_STRING, 0, 0, 0},
   {"ACTION_REFERENCE_NEW_ROW", 3, MYSQL_TYPE_STRING, 0, 0, 0},
-  {"CREATED", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, "Created"},
+  {"CREATED", 0, MYSQL_TYPE_DATETIME, 0, 1, "Created"},
   {"SQL_MODE", 65535, MYSQL_TYPE_STRING, 0, 0, "sql_mode"},
   {"DEFINER", 65535, MYSQL_TYPE_STRING, 0, 0, "Definer"},
   {0, 0, MYSQL_TYPE_STRING, 0, 0, 0}
@@ -5670,23 +5695,23 @@ ST_FIELD_INFO partitions_fields_info[]=
   {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
   {"PARTITION_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
   {"SUBPARTITION_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
-  {"PARTITION_ORDINAL_POSITION", 21 , MYSQL_TYPE_LONG, 0, 1, 0},
-  {"SUBPARTITION_ORDINAL_POSITION", 21 , MYSQL_TYPE_LONG, 0, 1, 0},
+  {"PARTITION_ORDINAL_POSITION", 21, MYSQL_TYPE_LONGLONG, 0, 1, 0},
+  {"SUBPARTITION_ORDINAL_POSITION", 21, MYSQL_TYPE_LONGLONG, 0, 1, 0},
   {"PARTITION_METHOD", 12, MYSQL_TYPE_STRING, 0, 1, 0},
   {"SUBPARTITION_METHOD", 12, MYSQL_TYPE_STRING, 0, 1, 0},
   {"PARTITION_EXPRESSION", 65535, MYSQL_TYPE_STRING, 0, 1, 0},
   {"SUBPARTITION_EXPRESSION", 65535, MYSQL_TYPE_STRING, 0, 1, 0},
   {"PARTITION_DESCRIPTION", 65535, MYSQL_TYPE_STRING, 0, 1, 0},
-  {"TABLE_ROWS", 21 , MYSQL_TYPE_LONG, 0, 0, 0},
-  {"AVG_ROW_LENGTH", 21 , MYSQL_TYPE_LONG, 0, 0, 0},
-  {"DATA_LENGTH", 21 , MYSQL_TYPE_LONG, 0, 0, 0},
-  {"MAX_DATA_LENGTH", 21 , MYSQL_TYPE_LONG, 0, 1, 0},
-  {"INDEX_LENGTH", 21 , MYSQL_TYPE_LONG, 0, 0, 0},
-  {"DATA_FREE", 21 , MYSQL_TYPE_LONG, 0, 0, 0},
-  {"CREATE_TIME", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, 0},
-  {"UPDATE_TIME", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, 0},
-  {"CHECK_TIME", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, 0},
-  {"CHECKSUM", 21 , MYSQL_TYPE_LONG, 0, 1, 0},
+  {"TABLE_ROWS", 21 , MYSQL_TYPE_LONGLONG, 0, 0, 0},
+  {"AVG_ROW_LENGTH", 21 , MYSQL_TYPE_LONGLONG, 0, 0, 0},
+  {"DATA_LENGTH", 21 , MYSQL_TYPE_LONGLONG, 0, 0, 0},
+  {"MAX_DATA_LENGTH", 21 , MYSQL_TYPE_LONGLONG, 0, 1, 0},
+  {"INDEX_LENGTH", 21 , MYSQL_TYPE_LONGLONG, 0, 0, 0},
+  {"DATA_FREE", 21 , MYSQL_TYPE_LONGLONG, 0, 0, 0},
+  {"CREATE_TIME", 0, MYSQL_TYPE_DATETIME, 0, 1, 0},
+  {"UPDATE_TIME", 0, MYSQL_TYPE_DATETIME, 0, 1, 0},
+  {"CHECK_TIME", 0, MYSQL_TYPE_DATETIME, 0, 1, 0},
+  {"CHECKSUM", 21 , MYSQL_TYPE_LONGLONG, 0, 1, 0},
   {"PARTITION_COMMENT", 80, MYSQL_TYPE_STRING, 0, 0, 0},
   {"NODEGROUP", 12 , MYSQL_TYPE_STRING, 0, 0, 0},
   {"TABLESPACE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
@@ -5720,12 +5745,12 @@ ST_FIELD_INFO system_variables_fields_in
 
 ST_FIELD_INFO processlist_fields_info[]=
 {
-  {"ID", 4, MYSQL_TYPE_LONG, 0, 0, "Id"},
+  {"ID", 4, MYSQL_TYPE_LONGLONG, 0, 0, "Id"},
   {"USER", 16, MYSQL_TYPE_STRING, 0, 0, "User"},
   {"HOST", LIST_PROCESS_HOST_LEN,  MYSQL_TYPE_STRING, 0, 0, "Host"},
   {"DB", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, "Db"},
   {"COMMAND", 16, MYSQL_TYPE_STRING, 0, 0, "Command"},
-  {"TIME", 7, MYSQL_TYPE_LONG, 0, 0, "Time"},
+  {"TIME", 7, MYSQL_TYPE_LONGLONG, 0, 0, "Time"},
   {"STATE", 64, MYSQL_TYPE_STRING, 0, 1, "State"},
   {"INFO", PROCESS_LIST_INFO_WIDTH, MYSQL_TYPE_STRING, 0, 1, "Info"},
   {0, 0, MYSQL_TYPE_STRING, 0, 0, 0}
@@ -5749,7 +5774,7 @@ ST_FIELD_INFO plugin_fields_info[]=
 
 ST_FIELD_INFO files_fields_info[]=
 {
-  {"FILE_ID", 4, MYSQL_TYPE_LONG, 0, 0, 0},
+  {"FILE_ID", 4, MYSQL_TYPE_LONGLONG, 0, 0, 0},
   {"FILE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
   {"FILE_TYPE", 20, MYSQL_TYPE_STRING, 0, 0, 0},
   {"TABLESPACE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
@@ -5757,34 +5782,34 @@ ST_FIELD_INFO files_fields_info[]=
   {"TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
   {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
   {"LOGFILE_GROUP_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
-  {"LOGFILE_GROUP_NUMBER", 4, MYSQL_TYPE_LONG, 0, 1, 0},
+  {"LOGFILE_GROUP_NUMBER", 4, MYSQL_TYPE_LONGLONG, 0, 1, 0},
   {"ENGINE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
   {"FULLTEXT_KEYS", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
-  {"DELETED_ROWS", 4, MYSQL_TYPE_LONG, 0, 1, 0},
-  {"UPDATE_COUNT", 4, MYSQL_TYPE_LONG, 0, 1, 0},
-  {"FREE_EXTENTS", 4, MYSQL_TYPE_LONG, 0, 1, 0},
-  {"TOTAL_EXTENTS", 4, MYSQL_TYPE_LONG, 0, 1, 0},
-  {"EXTENT_SIZE", 4, MYSQL_TYPE_LONG, 0, 0, 0},
-  {"INITIAL_SIZE", 21, MYSQL_TYPE_LONG, 0, 1, 0},
-  {"MAXIMUM_SIZE", 21, MYSQL_TYPE_LONG, 0, 1, 0},
-  {"AUTOEXTEND_SIZE", 21, MYSQL_TYPE_LONG, 0, 1, 0},
-  {"CREATION_TIME", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, 0},
-  {"LAST_UPDATE_TIME", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, 0},
-  {"LAST_ACCESS_TIME", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, 0},
-  {"RECOVER_TIME", 4, MYSQL_TYPE_LONG, 0, 1, 0},
-  {"TRANSACTION_COUNTER", 4, MYSQL_TYPE_LONG, 0, 1, 0},
-  {"VERSION", 21 , MYSQL_TYPE_LONG, 0, 1, "Version"},
+  {"DELETED_ROWS", 4, MYSQL_TYPE_LONGLONG, 0, 1, 0},
+  {"UPDATE_COUNT", 4, MYSQL_TYPE_LONGLONG, 0, 1, 0},
+  {"FREE_EXTENTS", 4, MYSQL_TYPE_LONGLONG, 0, 1, 0},
+  {"TOTAL_EXTENTS", 4, MYSQL_TYPE_LONGLONG, 0, 1, 0},
+  {"EXTENT_SIZE", 4, MYSQL_TYPE_LONGLONG, 0, 0, 0},
+  {"INITIAL_SIZE", 21, MYSQL_TYPE_LONGLONG, 0, 1, 0},
+  {"MAXIMUM_SIZE", 21, MYSQL_TYPE_LONGLONG, 0, 1, 0},
+  {"AUTOEXTEND_SIZE", 21, MYSQL_TYPE_LONGLONG, 0, 1, 0},
+  {"CREATION_TIME", 0, MYSQL_TYPE_DATETIME, 0, 1, 0},
+  {"LAST_UPDATE_TIME", 0, MYSQL_TYPE_DATETIME, 0, 1, 0},
+  {"LAST_ACCESS_TIME", 0, MYSQL_TYPE_DATETIME, 0, 1, 0},
+  {"RECOVER_TIME", 4, MYSQL_TYPE_LONGLONG, 0, 1, 0},
+  {"TRANSACTION_COUNTER", 4, MYSQL_TYPE_LONGLONG, 0, 1, 0},
+  {"VERSION", 21 , MYSQL_TYPE_LONGLONG, 0, 1, "Version"},
   {"ROW_FORMAT", 10, MYSQL_TYPE_STRING, 0, 1, "Row_format"},
-  {"TABLE_ROWS", 21 , MYSQL_TYPE_LONG, 0, 1, "Rows"},
-  {"AVG_ROW_LENGTH", 21 , MYSQL_TYPE_LONG, 0, 1, "Avg_row_length"},
-  {"DATA_LENGTH", 21 , MYSQL_TYPE_LONG, 0, 1, "Data_length"},
-  {"MAX_DATA_LENGTH", 21 , MYSQL_TYPE_LONG, 0, 1, "Max_data_length"},
-  {"INDEX_LENGTH", 21 , MYSQL_TYPE_LONG, 0, 1, "Index_length"},
-  {"DATA_FREE", 21 , MYSQL_TYPE_LONG, 0, 1, "Data_free"},
-  {"CREATE_TIME", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, "Create_time"},
-  {"UPDATE_TIME", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, "Update_time"},
-  {"CHECK_TIME", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, "Check_time"},
-  {"CHECKSUM", 21 , MYSQL_TYPE_LONG, 0, 1, "Checksum"},
+  {"TABLE_ROWS", 21 , MYSQL_TYPE_LONGLONG, 0, 1, "Rows"},
+  {"AVG_ROW_LENGTH", 21 , MYSQL_TYPE_LONGLONG, 0, 1, "Avg_row_length"},
+  {"DATA_LENGTH", 21 , MYSQL_TYPE_LONGLONG, 0, 1, "Data_length"},
+  {"MAX_DATA_LENGTH", 21 , MYSQL_TYPE_LONGLONG, 0, 1, "Max_data_length"},
+  {"INDEX_LENGTH", 21 , MYSQL_TYPE_LONGLONG, 0, 1, "Index_length"},
+  {"DATA_FREE", 21 , MYSQL_TYPE_LONGLONG, 0, 1, "Data_free"},
+  {"CREATE_TIME", 0, MYSQL_TYPE_DATETIME, 0, 1, "Create_time"},
+  {"UPDATE_TIME", 0, MYSQL_TYPE_DATETIME, 0, 1, "Update_time"},
+  {"CHECK_TIME", 0, MYSQL_TYPE_DATETIME, 0, 1, "Check_time"},
+  {"CHECKSUM", 21 , MYSQL_TYPE_LONGLONG, 0, 1, "Checksum"},
   {"STATUS", 20, MYSQL_TYPE_STRING, 0, 0, 0},
   {"EXTRA", 255, MYSQL_TYPE_STRING, 0, 1, 0},
   {0, 0, MYSQL_TYPE_STRING, 0, 0, 0}

--- 1.151/mysql-test/r/information_schema.result	2007-04-06 16:53:01 +05:00
+++ 1.152/mysql-test/r/information_schema.result	2007-04-18 16:13:51 +05:00
@@ -520,7 +520,7 @@ CHARACTER_SETS	CREATE TEMPORARY TABLE `C
   `CHARACTER_SET_NAME` varchar(64) NOT NULL DEFAULT '',
   `DEFAULT_COLLATE_NAME` varchar(64) NOT NULL DEFAULT '',
   `DESCRIPTION` varchar(60) NOT NULL DEFAULT '',
-  `MAXLEN` bigint(3) NOT NULL DEFAULT '0'
+  `MAXLEN` bigint(3) unsigned NOT NULL DEFAULT '0'
 ) ENGINE=MEMORY DEFAULT CHARSET=utf8
 set names latin2;
 SHOW CREATE TABLE INFORMATION_SCHEMA.character_sets;
@@ -529,7 +529,7 @@ CHARACTER_SETS	CREATE TEMPORARY TABLE `C
   `CHARACTER_SET_NAME` varchar(64) NOT NULL DEFAULT '',
   `DEFAULT_COLLATE_NAME` varchar(64) NOT NULL DEFAULT '',
   `DESCRIPTION` varchar(60) NOT NULL DEFAULT '',
-  `MAXLEN` bigint(3) NOT NULL DEFAULT '0'
+  `MAXLEN` bigint(3) unsigned NOT NULL DEFAULT '0'
 ) ENGINE=MEMORY DEFAULT CHARSET=utf8
 set names latin1;
 create table t1 select * from information_schema.CHARACTER_SETS
@@ -544,7 +544,7 @@ t1	CREATE TABLE `t1` (
   `CHARACTER_SET_NAME` varchar(64) NOT NULL DEFAULT '',
   `DEFAULT_COLLATE_NAME` varchar(64) NOT NULL DEFAULT '',
   `DESCRIPTION` varchar(60) NOT NULL DEFAULT '',
-  `MAXLEN` bigint(3) NOT NULL DEFAULT '0'
+  `MAXLEN` bigint(3) unsigned NOT NULL DEFAULT '0'
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8
 drop table t1;
 create view v1 as select * from information_schema.TABLES;

--- 1.111/mysql-test/r/show_check.result	2007-03-06 17:44:10 +04:00
+++ 1.112/mysql-test/r/show_check.result	2007-04-18 16:13:51 +05:00
@@ -523,13 +523,13 @@ PRIMARY KEY(field1(1000))
 show index from t1;
 Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
 def			STATISTICS	TABLE_NAME	Table	253	64	2	N	1	0	63
-def			STATISTICS	NON_UNIQUE	Non_unique	8	1	1	N	32769	0	63
+def			STATISTICS	NON_UNIQUE	Non_unique	8	1	1	N	32801	0	63
 def			STATISTICS	INDEX_NAME	Key_name	253	64	7	N	1	0	63
-def			STATISTICS	SEQ_IN_INDEX	Seq_in_index	8	2	1	N	32769	0	63
+def			STATISTICS	SEQ_IN_INDEX	Seq_in_index	8	2	1	N	32801	0	63
 def			STATISTICS	COLUMN_NAME	Column_name	253	64	6	N	1	0	63
 def			STATISTICS	COLLATION	Collation	253	1	1	Y	0	0	63
-def			STATISTICS	CARDINALITY	Cardinality	8	21	1	Y	32768	0	63
-def			STATISTICS	SUB_PART	Sub_part	8	3	4	Y	32768	0	63
+def			STATISTICS	CARDINALITY	Cardinality	8	21	1	Y	32800	0	63
+def			STATISTICS	SUB_PART	Sub_part	8	3	4	Y	32800	0	63
 def			STATISTICS	PACKED	Packed	253	10	0	Y	0	0	63
 def			STATISTICS	NULLABLE	Null	253	3	0	N	1	0	63
 def			STATISTICS	INDEX_TYPE	Index_type	253	16	5	N	1	0	63

--- 1.144/sql/sp.cc	2007-04-04 14:05:11 +05:00
+++ 1.145/sql/sp.cc	2007-04-18 16:13:51 +05:00
@@ -784,7 +784,9 @@ db_show_routine_status(THD *thd, int typ
     {
       switch (used_field->field_type) {
       case MYSQL_TYPE_TIMESTAMP:
-	field_list.push_back(item=new Item_datetime(used_field->field_name));
+	field_list.push_back(item=
+                             new Item_return_date_time(used_field->field_name,
+                                                       MYSQL_TYPE_DATETIME));
 	break;
       default:
 	field_list.push_back(item=new Item_empty_string(used_field->field_name,
Thread
bk commit into 5.1 tree (gluh:1.2563) BUG#27047gluh18 Apr