Below is the list of changes that have just been committed into a local
5.1 repository of reggie. When reggie 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.2260 06/03/31 01:02:44 reggie@stripped +5 -0
BUG # 17631 SHOW TABLE STATUS reports wrong engine
sql/sql_show.cc
1.322 06/03/31 01:02:36 reggie@stripped +6 -0
if the table is partitioned, we add the term "partitioned" to the
create options. We make sure we are using the partitioned
handlerton before we do this. When we support more native partition
handlers then this will need to change.
sql/ha_partition.h
1.15 06/03/31 01:02:36 reggie@stripped +1 -2
removed inline version of this function
sql/ha_partition.cc
1.41 06/03/31 01:02:36 reggie@stripped +7 -0
move table_type func to .cc file and return table_type from
the first handler. This is acceptable since we know we have
at least one handler and we currently do not support multiple
engine types. Later, we'll need to extend this to return
some type of delimited list
mysql-test/t/partition.test
1.32 06/03/31 01:02:36 reggie@stripped +13 -0
test block for bug #17631
mysql-test/r/partition.result
1.30 06/03/31 01:02:35 reggie@stripped +11 -1
results block for bug # 17631
# 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: reggie
# Host: linux.site
# Root: /home/reggie/work/mysql-5.1
--- 1.321/sql/sql_show.cc 2006-03-21 06:10:10 -06:00
+++ 1.322/sql/sql_show.cc 2006-03-31 01:02:36 -06:00
@@ -2719,6 +2719,12 @@
ptr=strxmov(ptr, " row_format=",
ha_row_type[(uint) share->row_type],
NullS);
+#ifdef WITH_PARTITION_STORAGE_ENGINE
+ if (share->db_type == &partition_hton &&
+ share->partition_info != NULL &&
+ ((partition_info*)share->partition_info)->no_parts > 0)
+ ptr= strmov(ptr, " partitioned");
+#endif
table->field[19]->store(option_buff+1,
(ptr == option_buff ? 0 :
(uint) (ptr-option_buff)-1), cs);
--- 1.29/mysql-test/r/partition.result 2006-03-28 06:25:12 -06:00
+++ 1.30/mysql-test/r/partition.result 2006-03-31 01:02:35 -06:00
@@ -642,7 +642,7 @@
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
+t1 InnoDB 10 Compact 2 8192 16384 0 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
drop table t1;
create table t2 (s1 int not null auto_increment, primary key (s1)) partition by list (s1) (partition p1 values in (1),partition p2 values in (2),partition p3 values in (3),partition p4 values in (4));
insert into t2 values (null),(null),(null);
@@ -819,4 +819,14 @@
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pn,p2 ALL NULL NULL NULL NULL 2 Using where
drop table t1;
+CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, name VARCHAR(20))
+ENGINE=MyISAM DEFAULT CHARSET=latin1
+PARTITION BY RANGE(id)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = MyISAM,
+PARTITION p1 VALUES LESS THAN (20) ENGINE = MyISAM,
+PARTITION p2 VALUES LESS THAN (30) ENGINE = MyISAM);
+SHOW TABLE STATUS;
+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 MyISAM 10 Dynamic 0 0 0 0 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
+DROP TABLE t1;
End of 5.1 tests
--- 1.31/mysql-test/t/partition.test 2006-03-28 06:25:12 -06:00
+++ 1.32/mysql-test/t/partition.test 2006-03-31 01:02:36 -06:00
@@ -924,4 +924,17 @@
explain partitions select * from t1 where a is null or a < 0 or a > 1;
drop table t1;
+#
+#Bug# 17631 SHOW TABLE STATUS reports wrong engine
+#
+CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, name VARCHAR(20))
+ENGINE=MyISAM DEFAULT CHARSET=latin1
+PARTITION BY RANGE(id)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = MyISAM,
+PARTITION p1 VALUES LESS THAN (20) ENGINE = MyISAM,
+PARTITION p2 VALUES LESS THAN (30) ENGINE = MyISAM);
+--replace_column 6 0 7 0 8 0 9 0 12 NULL 13 NULL 14 NULL
+SHOW TABLE STATUS;
+DROP TABLE t1;
+
--echo End of 5.1 tests
--- 1.40/sql/ha_partition.cc 2006-03-22 04:45:06 -06:00
+++ 1.41/sql/ha_partition.cc 2006-03-31 01:02:36 -06:00
@@ -257,6 +257,13 @@
}
+const char *ha_partition::table_type() const
+{
+ // we can do this since we only support a single engine type
+ return m_file[0]->table_type();
+}
+
+
/*
Destructor method
--- 1.14/sql/ha_partition.h 2006-03-08 13:05:57 -06:00
+++ 1.15/sql/ha_partition.h 2006-03-31 01:02:36 -06:00
@@ -524,8 +524,7 @@
virtual const char *index_type(uint inx);
/* The name of the table type that will be used for display purposes */
- virtual const char *table_type() const
- { return "PARTITION"; }
+ virtual const char *table_type() const;
/* The name of the row type used for the underlying tables. */
virtual enum row_type get_row_type() const;
| Thread |
|---|
| • bk commit into 5.1 tree (reggie:1.2260) BUG#17631 | reggie | 31 Mar |