summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <timour@mysql.com>2004-12-27 14:06:28 +0200
committerunknown <timour@mysql.com>2004-12-27 14:06:28 +0200
commit47efc5f335d117cd0fbe3d1e633936ae70442933 (patch)
treeec4b71fc641f86ca0a0f55af0ab2a801228abd7e
parent7ab0561f422542bb27e3189da05d4d92cb1fbfb9 (diff)
parentb4c61152d3e30d9dca00d702053264bc4a610c73 (diff)
downloadmariadb-git-47efc5f335d117cd0fbe3d1e633936ae70442933.tar.gz
Merge mysql.com:/home/timka/mysql/src/4.1-virgin
into mysql.com:/home/timka/mysql/src/4.1-dbg
-rw-r--r--mysql-test/r/merge.result5
-rw-r--r--mysql-test/t/merge.test3
-rw-r--r--sql/ha_myisammrg.cc11
-rw-r--r--sql/ha_myisammrg.h1
4 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result
index f71626221cb..79d8f019ce3 100644
--- a/mysql-test/r/merge.result
+++ b/mysql-test/r/merge.result
@@ -675,4 +675,9 @@ a b c
1 2 0
1 1 1
1 1 0
+show index from t3;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t3 1 a 1 a A NULL NULL NULL YES BTREE
+t3 1 a 2 b A NULL NULL NULL YES BTREE
+t3 1 a 3 c A NULL NULL NULL YES BTREE
drop table t1, t2, t3;
diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test
index b628cb07f7b..508f9da225e 100644
--- a/mysql-test/t/merge.test
+++ b/mysql-test/t/merge.test
@@ -301,5 +301,8 @@ select a,b,c from t3 force index (a) where a=1 order by a,b,c;
explain select a,b,c from t3 force index (a) where a=1 order by a desc, b desc, c desc;
select a,b,c from t3 force index (a) where a=1 order by a desc, b desc, c desc;
+# BUG#7377 SHOW index on MERGE table crashes debug server
+show index from t3;
+
drop table t1, t2, t3;
diff --git a/sql/ha_myisammrg.cc b/sql/ha_myisammrg.cc
index bf4c2a36ffd..bf47b4625e0 100644
--- a/sql/ha_myisammrg.cc
+++ b/sql/ha_myisammrg.cc
@@ -35,6 +35,17 @@
const char **ha_myisammrg::bas_ext() const
{ static const char *ext[]= { ".MRG", NullS }; return ext; }
+const char *ha_myisammrg::index_type(uint key_number)
+{
+ return ((table->key_info[key_number].flags & HA_FULLTEXT) ?
+ "FULLTEXT" :
+ (table->key_info[key_number].flags & HA_SPATIAL) ?
+ "SPATIAL" :
+ (table->key_info[key_number].algorithm == HA_KEY_ALG_RTREE) ?
+ "RTREE" :
+ "BTREE");
+}
+
int ha_myisammrg::open(const char *name, int mode, uint test_if_locked)
{
diff --git a/sql/ha_myisammrg.h b/sql/ha_myisammrg.h
index 264c580220c..6058c32c805 100644
--- a/sql/ha_myisammrg.h
+++ b/sql/ha_myisammrg.h
@@ -32,6 +32,7 @@ class ha_myisammrg: public handler
~ha_myisammrg() {}
const char *table_type() const { return "MRG_MyISAM"; }
const char **bas_ext() const;
+ const char *index_type(uint key_number);
ulong table_flags() const
{
return (HA_REC_NOT_IN_SEQ | HA_AUTO_PART_KEY | HA_READ_RND_SAME |