Commit f9fa05a0 authored by jimw@mysql.com's avatar jimw@mysql.com

Merge mysql.com:/home/jimw/my/mysql-5.1-14673

into  mysql.com:/home/jimw/my/mysql-5.1-clean
parents d39e9204 b2fb280b
...@@ -428,4 +428,9 @@ partition by list (a) ...@@ -428,4 +428,9 @@ partition by list (a)
alter table t1 rebuild partition; alter table t1 rebuild partition;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
drop table t1; 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 End of 5.1 tests
...@@ -552,4 +552,11 @@ alter table t1 rebuild partition; ...@@ -552,4 +552,11 @@ alter table t1 rebuild partition;
drop table t1; 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 --echo End of 5.1 tests
...@@ -5115,6 +5115,22 @@ const char *ha_partition::index_type(uint inx) ...@@ -5115,6 +5115,22 @@ const char *ha_partition::index_type(uint inx)
} }
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) void ha_partition::print_error(int error, myf errflag)
{ {
DBUG_ENTER("ha_partition::print_error"); DBUG_ENTER("ha_partition::print_error");
......
...@@ -527,6 +527,9 @@ public: ...@@ -527,6 +527,9 @@ public:
virtual const char *table_type() const virtual const char *table_type() const
{ return "PARTITION"; } { 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 Handler specific error messages
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment