Btree index on heap table for MySQL-4.1 displays as HASH ?

Btree index on heap table for MySQL-4.1 displays as HASH ?

am 15.11.2002 18:47:30 von Jocelyn Fournier

Hi,

According to the MySQL-4.1 changelog, heap table should use BTREE index now.
However, when I use SHOW INDEX FROM table, MySQL displays "HASH" for the
Index_type of the table.

How-to-repeat :

CREATE TABLE `ol` (
`pseudo` char(35) character set latin1 NOT NULL default '',
PRIMARY KEY (`pseudo`)
) TYPE=HEAP

SHOW INDEX FROM ol;
+-------+------------+----------+--------------+------------ -+-----------+--
-----------+----------+--------+------+------------+-------- -+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation |
Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+-------+------------+----------+--------------+------------ -+-----------+--
-----------+----------+--------+------+------------+-------- -+
| ol | 0 | PRIMARY | 1 | pseudo | NULL |
NULL | NULL | NULL | | HASH | |
+-------+------------+----------+--------------+------------ -+-----------+--
-----------+----------+--------+------+------------+-------- -+
1 row in set (0.00 sec)

Is this a bug ?

Regards,
Jocelyn


------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13001@lists.mysql.com
To unsubscribe, e-mail

Re: Btree index on heap table for MySQL-4.1 displays as HASH ?

am 15.11.2002 18:57:09 von Sinisa Milivojevic

Jocelyn Fournier writes:
> Hi,
>
> According to the MySQL-4.1 changelog, heap table should use BTREE index now.
> However, when I use SHOW INDEX FROM table, MySQL displays "HASH" for the
> Index_type of the table.
>
> How-to-repeat :
>
> CREATE TABLE `ol` (
> `pseudo` char(35) character set latin1 NOT NULL default '',
> PRIMARY KEY (`pseudo`)
> ) TYPE=HEAP
>
> SHOW INDEX FROM ol;
> +-------+------------+----------+--------------+------------ -+-----------+--
> -----------+----------+--------+------+------------+-------- -+
> | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation |
> Cardinality | Sub_part | Packed | Null | Index_type | Comment |
> +-------+------------+----------+--------------+------------ -+-----------+--
> -----------+----------+--------+------+------------+-------- -+
> | ol | 0 | PRIMARY | 1 | pseudo | NULL |
> NULL | NULL | NULL | | HASH | |
> +-------+------------+----------+--------------+------------ -+-----------+--
> -----------+----------+--------+------+------------+-------- -+
> 1 row in set (0.00 sec)
>
> Is this a bug ?
>
> Regards,
> Jocelyn


Hi!

No , this is not a bug.

You forgot to specify : USING BTREE for the index.

--
Regards,
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com


------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13003@lists.mysql.com
To unsubscribe, e-mail