Bug #24139 Commands "show index" and "show keys" differ in embedded
Submitted: 9 Nov 2006 12:30 Modified: 23 Jan 2007 20:39
Reporter: Joerg Bruehe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Embedded Library ( libmysqld ) Severity:S3 (Non-critical)
Version:5.1.12-beta OS:all Unix
Assigned to: Alexey Botchkov CPU Architecture:Any
Tags: Q1

[9 Nov 2006 12:30] Joerg Bruehe
Description:
Test build of 5.1.12-beta, by accident including "embedded".

Embedded did not build on some platforms, crashed on others,
and on the remaining ones showed this:

-------------------------------------------------------
*** r/alter_table.result
--- r/alter_table.reject
***************
*** 172,178
  t1    1       n4      1       n4      A       10      NULL    NULL    YES     BTREE
  t1    1       n4      2       n1      A       10      NULL    NULL            BTREE
  t1    1       n4      3       n2      A       10      NULL    NULL    YES     BTREE
! t1    1       n4      4       n3      A       10      NULL    NULL    YES     BTREE
  drop table t1;
  create table t1 (i int unsigned not null auto_increment primary key);
  alter table t1 rename t2;
--- 172,178
  t1    1       n4      1       n4      A       10      NULL    NULL    YES     BTREE
  t1    1       n4      2       n1      A       10      NULL    NULL            BTREE
  t1    1       n4      3       n2      A       10      NULL    NULL    YES     BTREE
! t1    1       n4      4       n3      A       NULL    NULL    NULL    YES     BTREE
  drop table t1;
  create table t1 (i int unsigned not null auto_increment primary key);
  alter table t1 rename t2;
***************
*** 288,294
  Table Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Pac
ked     Null    Index_type      Comment
  t1    0       a       1       a       A       NULL    NULL    NULL    YES     BTREE
  t1    0       a       2       b       A       NULL    NULL    NULL    YES     BTREE
! t1    1       b       1       b       A       100     NULL    NULL    YES     BTREE
  analyze table t1;
  Table Op      Msg_type        Msg_text
  test.t1       analyze status  OK
--- 288,294
  Table Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Pac
ked     Null    Index_type      Comment
  t1    0       a       1       a       A       NULL    NULL    NULL    YES     BTREE
  t1    0       a       2       b       A       NULL    NULL    NULL    YES     BTREE
! t1    1       b       1       b       A       NULL    NULL    NULL    YES     BTREE
  analyze table t1;
  Table Op      Msg_type        Msg_text
  test.t1       analyze status  OK
***************
*** 343,351
  ALTER TABLE t1 ENABLE KEYS;
  SHOW INDEX FROM t1;
  Table Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Pac
ked     Null    Index_type      Comment
! t1    0       PRIMARY 1       Host    A       NULL    NULL    NULL            BTREE
  t1    0       PRIMARY 2       User    A       2       NULL    NULL            BTREE
! t1    1       Host    1       Host    A       1       NULL    NULL            BTREE
  UNLOCK TABLES;
  CHECK TABLES t1;
  Table Op      Msg_type        Msg_text
--- 343,351
  ALTER TABLE t1 ENABLE KEYS;
  SHOW INDEX FROM t1;
  Table Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Pac
ked     Null    Index_type      Comment
! t1    0       PRIMARY 1       Host    A       1       NULL    NULL            BTREE
  t1    0       PRIMARY 2       User    A       2       NULL    NULL            BTREE
! t1    1       Host    1       Host    A       NULL    NULL    NULL            BTREE
  UNLOCK TABLES;
  CHECK TABLES t1;
  Table Op      Msg_type        Msg_text
***************

(further differences reported in separate bug report)

How to repeat:
Detected by release (test) build.
[23 Jan 2007 20:39] Paul DuBois
No changelog entry needed.