List:Commits« Previous MessageNext Message »
From:Alexander Barkov Date:May 16 2012 8:25am
Subject:bzr push into mysql-trunk branch (alexander.barkov:3848 to 3849)
View as plain text  
 3849 Alexander Barkov	2012-05-16
      Removing Item_return_date_time and using Item_temporal instead,
      as it has all the functionality needed for SHOW purposes.

    modified:
      sql/item.h
      sql/sql_show.cc
 3848 Olav Sandstaa	2012-05-16 [merge]
      Merging fix for Bug#12667154 from mysql-5.5 to mysql-trunk.

    modified:
      internal/mysql-test/suite/i_main/r/subquery.result
      internal/mysql-test/suite/i_main/t/subquery.test
      sql/sql_executor.cc
=== modified file 'sql/item.h'
--- a/sql/item.h	2012-05-16 06:42:17 +0000
+++ b/sql/item.h	2012-05-16 08:24:00 +0000
@@ -2551,6 +2551,8 @@ public:
      WHERE datetime_column NOT IN
      ('2006-04-25 10:00:00','2006-04-25 10:02:00', ...);
 
+  and for SHOW/INFORMATION_SCHEMA purposes (see sql_show.cc)
+
   TS-TODO: Can't we use Item_time_literal, Item_date_literal,
   TS-TODO: and Item_datetime_literal for this purpose?
 */
@@ -2923,19 +2925,6 @@ public:
 };
 
 
-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_string(name_arg, strlen(name_arg)),
-                                     0, &my_charset_bin),
-     date_time_field_type(field_type_arg)
-  { decimals= 0; }
-  enum_field_types field_type() const { return date_time_field_type; }
-};
-
-
 class Item_blob :public Item_partition_func_safe_string
 {
 public:

=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc	2012-05-16 06:42:17 +0000
+++ b/sql/sql_show.cc	2012-05-16 08:24:00 +0000
@@ -6735,12 +6735,13 @@ TABLE *create_schema_table(THD *thd, TAB
     case MYSQL_TYPE_TIME:
     case MYSQL_TYPE_TIMESTAMP:
     case MYSQL_TYPE_DATETIME:
-      if (!(item=new Item_return_date_time(fields_info->field_name,
-                                           fields_info->field_type)))
-      {
+    {
+      const Name_string field_name(fields_info->field_name,
+                                   strlen(fields_info->field_name));
+      if (!(item=new Item_temporal(fields_info->field_type, field_name, 0, 0)))
         DBUG_RETURN(0);
-      }
       break;
+    }
     case MYSQL_TYPE_FLOAT:
     case MYSQL_TYPE_DOUBLE:
     {

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (alexander.barkov:3848 to 3849) Alexander Barkov16 May