Bug #27710 Creating unique index fails during single user mode
Submitted: 9 Apr 2007 9:18 Modified: 30 Apr 2007 9:00
Reporter: Serge Kozlov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:5.1.18 OS:Linux (FC4 64bit)
Assigned to: Tomas Ulin CPU Architecture:Any

[9 Apr 2007 9:18] Serge Kozlov
Description:
Creating unique index fails if mysqld is connected in single user mode to cluster

How to repeat:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.18-beta-log Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use test;
Database changed
mysql> create table t1 (a int not null primary key, b int not null) engine=ndb;
Query OK, 0 rows affected (1.38 sec)

mysql> insert into t1 values (1,1),(2,2),(3,3);
Query OK, 3 rows affected (0.00 sec)
Records: 3  Duplicates: 0  Warnings: 0

mysql> alter table t1 add unique index b_index (b);
Query OK, 0 rows affected (2.55 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> alter table t1 drop index b_index;
Query OK, 0 rows affected (2.03 sec)
Records: 0  Duplicates: 0  Warnings: 0

// Switch this mysqld node to single user mode //

mysql> alter table t1 add unique index b_index (b);
ERROR 1296 (HY000): Got error 4346 'Internal error at index create/build' from N
DBCLUSTER
mysql>
[16 Apr 2007 8:27] Tomas Ulin
changed back, misunderstood report
[16 Apr 2007 10:52] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/24581

ChangeSet@1.2591, 2007-04-16 13:08:09+02:00, tomas@whalegate.ndb.mysql.com +3 -0
  Bug #27710 Creating unique index fails during single user mode
  - enable indexes to be used always, if in single user, reject will happen before, and if it is kerlel doing stuff, it should always be allowed
[16 Apr 2007 11:52] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/24587

ChangeSet@1.2456, 2007-04-16 14:07:31+02:00, tomas@whalegate.ndb.mysql.com +3 -0
    Bug #27710 Creating unique index fails during single user mode
    - enable indexes to be used always, if in single user, reject will happen before, and if it is kerlel doing stuff, it should always be allowed
[17 Apr 2007 13:40] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/24653

ChangeSet@1.2461, 2007-04-17 15:40:38+02:00, kent@mysql.com +1 -0
  Dbdict.cpp:
    Bug #27710 Creating unique index fails during single user mode
    - enable indexes to be used always, if in single user, reject will happen before, and if it is kerlel doing stuff, it should always be allowed
[26 Apr 2007 11:34] Bugs System
Pushed into 5.0.42
[26 Apr 2007 11:35] Bugs System
Pushed into 5.1.18-beta
[27 Apr 2007 9:21] Bugs System
Pushed into 5.1.18-beta
[27 Apr 2007 9:23] Bugs System
Pushed into 5.0.42
[27 Apr 2007 12:15] Jon Stephens
Which of the following statements is true?

1. You are allowed to create indexes while in single user mode. (But it didn't work until this bug was fixed.)

2. You are not allowed to create indexes while in single user mode. (And this should be noted as a limitation in the documentation.)
[30 Apr 2007 9:00] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Documented bugfix in 5.0.42 and 5.1.18 changelogs.