Bug #19026 | Proper error message should be returned on creating index on BIT field | ||
---|---|---|---|
Submitted: | 11 Apr 2006 22:27 | Modified: | 27 Apr 2006 6:51 |
Reporter: | Nikolay Grishakin | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Cluster: Cluster (NDB) storage engine | Severity: | S3 (Non-critical) |
Version: | 5.0 -> | OS: | Linux (Linux) |
Assigned to: | Martin Skold | CPU Architecture: | Any |
[11 Apr 2006 22:27]
Nikolay Grishakin
[11 Apr 2006 22:40]
Nikolay Grishakin
No core with non NDB table. CREATE TABLE test.t1 (a1 INT PRIMARY KEY); In this case MyISAM engine is used.
[11 Apr 2006 22:59]
Nikolay Grishakin
Got rid of all TEXT and BLOB fields in table t1 but it did not help still see the core.
[12 Apr 2006 5:41]
Jonas Oreland
Do you need DD ?
[12 Apr 2006 15:42]
Nikolay Grishakin
Got the core with DD too. To reproduce change create statment in test case to CREATE TABLE test.t1 (a1 INT PRIMARY KEY) ENGINE=NDB; core back trace: (gdb) bt #0 0x00966402 in __kernel_vsyscall () #1 0x0074655f in pthread_kill () from /lib/libpthread.so.0 #2 0x082e826c in write_core (sig=3012) at stacktrace.c:220 #3 0x081e0757 in handle_segfault (sig=11) at mysqld.cc:2179 #4 <signal handler called> #5 0x0850b0da in NdbDictionary::Column::getColumnNo (this=0x0) at NdbDictionary.cpp:225 #6 0x084f768b in NdbDictInterface::create_index_obj_from_table (dst=0x0, tab=0xa0d6338, prim=0xa0df868) at NdbDictionaryImpl.cpp:2976 #7 0x084fae00 in NdbDictionaryImpl::getIndexImpl (this=0x9d65dc4, externalName=0xa0d3609 "PRIMARY", internalName=@0x3cdb8c) at NdbDictionaryImpl.cpp:2934 #8 0x0850eb3e in NdbDictionary::Dictionary::getIndex (this=0x0, indexName=0xa0d3609 "PRIMARY", tableName=0x3cdf69 "t1") at NdbDictionaryImpl.hpp:918 #9 0x0832d6c1 in ha_ndbcluster::add_index_handle (this=0x3cdd94, thd=0x9d1f258, dict=0x9d65dc4, key_info=0xa0d58b0, index_name=0xa0d3609 "PRIMARY", index_no=0) at ha_ndbcluster.cc:1227 #10 0x0832db4b in ha_ndbcluster::open_indexes (this=0x3cdd94, ndb=0x9d5dd28, tab=0xa0d3078, ignore_error=true) at ha_ndbcluster.cc:1284 #11 0x0833ec77 in ndb_handle_schema_change (thd=0x9d1f258, ndb=0x9d5dd28, pOp=0x9d1e0e8, share=0xa0d2998) at ha_ndbcluster_binlog.cc:1412 #12 0x08342b71 in ndb_binlog_thread_func (arg=0x0) at ha_ndbcluster_binlog.cc:2705 #13 0x00743b80 in start_thread () from /lib/libpthread.so.0 #14 0x0069bdee in clone () from /lib/libc.so.6
[12 Apr 2006 16:18]
Jonas Oreland
looks like online add index
[12 Apr 2006 16:29]
Nikolay Grishakin
Removed DD from bug description.
[19 Apr 2006 16:58]
Nikolay Grishakin
Just tried with latest mysql-5.1-new build and don't see the core any more. I see the error : "query 'ALTER TABLE test.t1 ADD INDEX (a4)' failed: 1005: Can't create table #'test.#sql-5711_2' (errno: 140)" trying to create index on BIT field. The test case to reproduce: -- source include/have_ndb.inc CREATE LOGFILE GROUP lg ADD UNDOFILE './lg_group/undofile.dat' INITIAL_SIZE 16M UNDO_BUFFER_SIZE = 1M ENGINE=NDB; CREATE TABLESPACE ts ADD DATAFILE './table_space/datafile.dat' USE LOGFILE GROUP lg INITIAL_SIZE 12M ENGINE NDB; CREATE TABLE test.t1 (a1 INT PRIMARY KEY) TABLESPACE ts STORAGE DISK ENGINE=NDB; ALTER TABLE test.t1 ADD a2 FLOAT, ADD a3 DOUBLE, ADD a4 BIT, ADD a5 TINYINT, ADD a6 BIGINT, ADD a7 DATE, ADD a8 TIME, ADD a9 DATETIME, ADD a10 TINYTEXT, ADD a11 MEDIUMTEXT, ADD a12 LONGTEXT, ADD a13 TEXT, ADD a14 BLOB; SHOW CREATE TABLE test.t1; ALTER TABLE test.t1 ADD INDEX (a4); #query 'ALTER TABLE test.t1 ADD INDEX (a4)' failed: 1005: Can't create table #'test.#sql-5711_2' (errno: 140) SHOW CREATE TABLE test.t1; DROP TABLE test.t1; ALTER TABLESPACE ts DROP DATAFILE './table_space/datafile.dat' ENGINE NDB; DROP TABLESPACE ts ENGINE NDB; DROP LOGFILE GROUP lg ENGINE=NDB;
[21 Apr 2006 6:52]
Martin Skold
This one appears to have been fixed in 5.1.10, since it is no longer reproducable.
[21 Apr 2006 14:21]
Nikolay Grishakin
Core is no longer here. Changing bug description to "Proper error message should be returned on creating index on BIT field" and removing P1 priority.
[24 Apr 2006 6:40]
Tomas Ulin
this gives correct message for: master> CREATE TABLE test.t2 (a1 INT PRIMARY KEY, a4 bit) engine=ndb; Query OK, 0 rows affected (1.23 sec) master> ALTER TABLE test.t2 ADD INDEX (a4); ERROR 1296 (HY000): Got error 906 'Unsupported attribute type in index' from NDBCLUSTER But when using the longer create sequence above it gives: master> ALTER TABLE test.t1 ADD INDEX (a4); ERROR 1005 (HY000): Can't create table 'test.#sql-1cb7_2' (errno: 906) So still "906" is given as the correct originating error code. Therefore lowering to p4.