Bug w/BTree index cardinality in 4.1 HEAP tables...

Bug w/BTree index cardinality in 4.1 HEAP tables...

am 08.01.2003 08:36:27 von Jeremy Zawodny

How-to-repeat:

mysql> create table a_heap ( a varchar(10), index using btree (a) ) type = HEAP

Query OK, 0 rows affected (0.00 sec)

mysql> insert into a_heap values ('foo'), ('bar'), ('baz');
Query OK, 3 rows affected (0.00 sec)
Records: 3 Duplicates: 0 Warnings: 0

mysql> select * from a_heap;
+------+
| a |
+------+
| foo |
| bar |
| baz |
+------+
3 rows in set (0.00 sec)

mysql> show keys from a_heap \G
*************************** 1. row ***************************
Table: a_heap
Non_unique: 1
Key_name: a
Seq_in_index: 1
Column_name: a
Collation: A
Cardinality: NULL
Sub_part: NULL
Packed: NULL
Null: YES
Index_type: BTREE
Comment:
1 row in set (0.00 sec)

Notice that Cardinality is NULL. It should be 3, right?

Also, what's the syntax for packed keys in HEAP/BTree? Same as MyISAM?

If I append "PACK_KEYS = 1" to the CREATE TABLE statement, it works but
the value for "Packed:" is still NULL.

Thanks,

Jeremy
--
Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo!
| http://jeremy.zawodny.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-thread13420@lists.mysql.com
To unsubscribe, e-mail

Re: Bug w/BTree index cardinality in 4.1 HEAP tables...

am 09.01.2003 17:40:04 von Ramil Kalimullin

Hello Jeremy,

Wednesday, January 8, 2003, 11:36:27 AM, you wrote:

JZ> How-to-repeat:

mysql>> create table a_heap ( a varchar(10), index using btree (a) ) type = HEAP

JZ> Query OK, 0 rows affected (0.00 sec)

mysql>> insert into a_heap values ('foo'), ('bar'), ('baz');
JZ> Query OK, 3 rows affected (0.00 sec)
JZ> Records: 3 Duplicates: 0 Warnings: 0

mysql>> select * from a_heap;
JZ> +------+
JZ> | a |
JZ> +------+
JZ> | foo |
JZ> | bar |
JZ> | baz |
JZ> +------+
JZ> 3 rows in set (0.00 sec)

mysql>> show keys from a_heap \G
JZ> *************************** 1. row ***************************
JZ> Table: a_heap
JZ> Non_unique: 1
JZ> Key_name: a
JZ> Seq_in_index: 1
JZ> Column_name: a
JZ> Collation: A
JZ> Cardinality: NULL
JZ> Sub_part: NULL
JZ> Packed: NULL
JZ> Null: YES
JZ> Index_type: BTREE
JZ> Comment:
JZ> 1 row in set (0.00 sec)

JZ> Notice that Cardinality is NULL. It should be 3, right?

Cardinality calculation for BTREE keys is not implemented yet.
This task is in my TODO.

JZ> Also, what's the syntax for packed keys in HEAP/BTree? Same as MyISAM?

BTREE keys for HEAP don't support packed keys.

Regards,
Ramil.
--
For technical support contracts, visit https://order.mysql.com/?ref=mrka
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Ramil Kalimullin
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer
/_/ /_/\_, /___/\___\_\___/ Izhevsk, Russia
<___/ 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-thread13437@lists.mysql.com
To unsubscribe, e-mail

Re: Bug w/BTree index cardinality in 4.1 HEAP tables...

am 09.01.2003 23:02:21 von Jeremy Zawodny

On Thu, Jan 09, 2003 at 08:40:04PM +0400, Ramil Kalimullin wrote:
>
> JZ> Notice that Cardinality is NULL. It should be 3, right?
>
> Cardinality calculation for BTREE keys is not implemented yet.
> This task is in my TODO.

Got it.

> JZ> Also, what's the syntax for packed keys in HEAP/BTree? Same as MyISAM?
>
> BTREE keys for HEAP don't support packed keys.

What about the prefix compression that MyISAM does? (I'm guessing
they won't do that either.)

Thanks,

Jeremy
--
Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo!
| http://jeremy.zawodny.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-thread13439@lists.mysql.com
To unsubscribe, e-mail

Re[2]: Bug w/BTree index cardinality in 4.1 HEAP tables...

am 10.01.2003 08:32:42 von Ramil Kalimullin

Hello Jeremy,

Friday, January 10, 2003, 2:01:21 AM, you wrote:
>> JZ> Also, what's the syntax for packed keys in HEAP/BTree? Same as MyISAM?
>>
>> BTREE keys for HEAP don't support packed keys.

JZ> What about the prefix compression that MyISAM does? (I'm guessing
JZ> they won't do that either.)

Your guess is right.

Regards,
Ramil.
--
For technical support contracts, visit https://order.mysql.com/?ref=mrka
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Ramil Kalimullin
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer
/_/ /_/\_, /___/\___\_\___/ Izhevsk, Russia
<___/ 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-thread13445@lists.mysql.com
To unsubscribe, e-mail