Hi!
Innobase does not support partial-field indexes. We have to block their
usage in the SQL parser. Miguel's query on Win NT perhaps worked because the
optimizer there chose another access path and did not use the partial-field
index.
But thank you Alex, we have to block them in the parser, and I will
update the Innobase online manual immediately.
Regards,
Heikki
At 12:30 PM 4/12/01 +0200, you wrote:
>Bonjour,
>
> We found a bug in INNOBASE tables with col_name(length) indexes.
>
> Here is the table :
>
>create table test (
> symbole char(20) not null primary key,
> libelle char(100) not null,
> index id_lib (libelle(1))
>) TYPE=INNOBASE;
>
>
> For the test I insert one row but there can be many, the result is
> the same :
>
>insert into test values('AAAAA','ABCDEF');
>
> I check that the row is in the table :
>
>mysql> select * from test;
>+---------+---------+
>| symbole | libelle |
>+---------+---------+
>| AAAAA | ABCDEF |
>+---------+---------+
>1 row in set (0.00 sec)
>
> I check the indexes in the table :
>
>mysql> show index from test;
>+-------+------------+----------+--------------+--------------+-----------+
-------------+----------+--------+---------+
>| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation |
Cardinality | Sub_part | Packed | Comment |
>+-------+------------+----------+--------------+--------------+-----------+
-------------+----------+--------+---------+
>| test | 0 | PRIMARY | 1 | symbole | A |
NULL | NULL | NULL | |
>| test | 1 | id_lib | 1 | libelle | A |
NULL | 1 | NULL | |
>+-------+------------+----------+--------------+--------------+-----------+
-------------+----------+--------+---------+
>2 rows in set (0.00 sec)
>
> But here is the problem :
>
>mysql> select * from test where libelle like 'A%';
>Empty set (0.00 sec)
>
>mysql> select * from test where libelle like 'a%';
>Empty set (0.00 sec)
>
>
> This bug does not occur with a MyISAM table.
>
> We use Myslq-3.23.26 with latest Solaris patch from Heikki, under
> Solaris 2.8 and SPARC 4 CPU.
>
> Regards,
> Alex.
>
>
>
---------------------------------------------------------------------
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 <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php