Bug #18039 DD: Create unique index cause error 4243
Submitted: 7 Mar 2006 16:02 Modified: 14 Mar 2006 10:43
Reporter: Jonathan Miller Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:5.1.8 OS:Linux (Linux)
Assigned to: Martin Skold CPU Architecture:Any

[7 Mar 2006 16:02] Jonathan Miller
Description:
Errors are (from /home/ndbdev/jmiller/clones/mysql-5.1-new/mysql-test/var/log/mysqltest-time) :
mysqltest: At line 61: query 'CREATE UNIQUE INDEX t1_i2 ON t1(c2)' failed: 1296: Got error 4243 'Index not found' from NDBCLUSTER
(the last lines may be the most important ones)

How to repeat:
#### Include Section ####
--source include/have_ndb.inc

#### Test start cleanup section #####
--disable_warnings
DROP TABLE IF EXISTS t1, t2, t3;
--enable_warnings

CREATE LOGFILE GROUP lg1
ADD UNDOFILE 'undofile.dat'
INITIAL_SIZE 16M
UNDO_BUFFER_SIZE = 1M
ENGINE=NDB;

ALTER LOGFILE GROUP lg1
ADD UNDOFILE 'undofile02.dat'
INITIAL_SIZE 4M
ENGINE=NDB;

CREATE TABLESPACE ts1
ADD DATAFILE 'datafile.dat'
USE LOGFILE GROUP lg1
INITIAL_SIZE 12M
ENGINE=NDB;

ALTER TABLESPACE ts1
ADD DATAFILE 'datafile02.dat'
INITIAL_SIZE 4M
ENGINE=NDB;

CREATE TABLE t1
  (c1 INT NOT NULL PRIMARY KEY,
   c2 INT NOT NULL,
   c3 INT NOT NULL)
   TABLESPACE ts1 STORAGE DISK
   ENGINE=NDB;

--echo ***** insert some data *****

let $j= 900;
--disable_query_log
while ($j)
{
  eval INSERT INTO t1 VALUES($j,$j*2,$j+3);
  dec $j;
}
--enable_query_log

CREATE INDEX t1_i ON t1(c2, c3);
CREATE UNIQUE INDEX t1_i2 ON t1(c2);

DROP TABLE t1;

ALTER TABLESPACE ts1
DROP DATAFILE 'datafile.dat'
ENGINE=NDB;

ALTER TABLESPACE ts1
DROP DATAFILE 'datafile02.dat'
ENGINE=NDB;

DROP TABLESPACE ts1 ENGINE=NDB;

DROP LOGFILE GROUP lg1 ENGINE=NDB;

# End 5.1 test case
[10 Mar 2006 13:22] Martin Skold
Patch pushed to 5.1.8, together with patch for 
bug##18040: create unique index on non unique data causes crash
[10 Mar 2006 13:47] Martin Skold
Patches in:
https://intranet.mysql.com/secure/mailarchive/mail.php?folder=104&mail=84316
https://intranet.mysql.com/secure/mailarchive/mail.php?folder=104&mail=84362
[14 Mar 2006 10:43] 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 bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Documented bugfix in 5.1.8 changelog. Closed.