List:Commits« Previous MessageNext Message »
From:Jim Winstead Date:March 8 2006 7:06pm
Subject:bk commit into 5.1 tree (jimw:1.2151) BUG#14673
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of jimw. When jimw 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.2151 06/03/08 11:06:01 jimw@stripped +4 -0
  Bug #14673: Wrong InnoDB default row format
    Make partitioned tables report the row format of the underlying
    tables (when they are all the same).

  sql/ha_partition.h
    1.14 06/03/08 11:05:57 jimw@stripped +3 -0
    Add get_row_type() method

  sql/ha_partition.cc
    1.37 06/03/08 11:05:56 jimw@stripped +16 -0
    Add get_row_type(), which peeks at the underlying tables and returns
    the row_type if they are consistent.

  mysql-test/t/partition.test
    1.20 06/03/08 11:05:56 jimw@stripped +7 -0
    Add regression test

  mysql-test/r/partition.result
    1.17 06/03/08 11:05:56 jimw@stripped +5 -0
    Add new results

# 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:	jimw
# Host:	rama.(none)
# Root:	/home/jimw/my/mysql-5.1-14673

--- 1.16/mysql-test/r/partition.result	2006-03-07 11:37:52 -08:00
+++ 1.17/mysql-test/r/partition.result	2006-03-08 11:05:56 -08:00
@@ -422,4 +422,9 @@
 x123	11,12	1
 x234	NULL,1	1
 drop table t1;
+create table t1 (a int) engine=innodb partition by hash(a) ;
+show table status like 't1';
+Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
+t1	PARTITION	10	Compact	2	8192	16384	0	0	0	NULL	NULL	NULL	NULL	latin1_swedish_ci	NULL		
+drop table t1;
 End of 5.1 tests

--- 1.19/mysql-test/t/partition.test	2006-03-07 11:37:52 -08:00
+++ 1.20/mysql-test/t/partition.test	2006-03-08 11:05:56 -08:00
@@ -540,4 +540,11 @@
 from information_schema.partitions where table_schema ='test';
 drop table t1;
 
+#
+# Bug #14673: Wrong InnoDB default row format
+#
+create table t1 (a int) engine=innodb partition by hash(a) ;
+show table status like 't1';
+drop table t1;
+
 --echo End of 5.1 tests

--- 1.36/sql/ha_partition.cc	2006-03-07 11:37:52 -08:00
+++ 1.37/sql/ha_partition.cc	2006-03-08 11:05:56 -08:00
@@ -5115,6 +5115,22 @@
 }
 
 
+enum row_type ha_partition::get_row_type() const
+{
+  handler **file;
+  enum row_type type= (*m_file)->get_row_type();
+
+  for (file= m_file, file++; *file; file++)
+  {
+    enum row_type part_type= (*file)->get_row_type();
+    if (part_type != type)
+      return ROW_TYPE_NOT_USED;
+  }
+
+  return type;
+}
+
+
 void ha_partition::print_error(int error, myf errflag)
 {
   DBUG_ENTER("ha_partition::print_error");

--- 1.13/sql/ha_partition.h	2006-03-04 12:21:18 -08:00
+++ 1.14/sql/ha_partition.h	2006-03-08 11:05:57 -08:00
@@ -527,6 +527,9 @@
   virtual const char *table_type() const
   { return "PARTITION"; }
 
+  /* The name of the row type used for the underlying tables. */
+  virtual enum row_type get_row_type() const;
+
   /*
      Handler specific error messages
   */
Thread
bk commit into 5.1 tree (jimw:1.2151) BUG#14673Jim Winstead8 Mar