Commit 8f9198ca authored by unknown's avatar unknown

Merge poseidon.mysql.com:/home/tomas/mysql-5.0-ndb

into  poseidon.mysql.com:/home/tomas/mysql-5.1-new-ndb


sql/ha_ndbcluster.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp:
  Auto merged
storage/ndb/include/portlib/NdbMem.h:
  Auto merged
storage/ndb/src/common/debugger/EventLogger.cpp:
  Auto merged
storage/ndb/src/common/portlib/NdbMem.c:
  Auto merged
storage/ndb/src/common/util/ConfigValues.cpp:
  Auto merged
storage/ndb/src/common/util/File.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
  Auto merged
storage/ndb/src/kernel/vm/Configuration.cpp:
  Auto merged
storage/ndb/src/kernel/vm/Configuration.hpp:
  Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
storage/ndb/test/ndbapi/testNodeRestart.cpp:
  Auto merged
storage/ndb/test/run-test/daily-basic-tests.txt:
  Auto merged
mysql-test/r/ndb_basic.result:
  manual merge
mysql-test/t/ndb_basic.test:
  manual merge
storage/ndb/src/ndbapi/ndberror.c:
  manual merge
parents 0add38d8 188899cd
...@@ -749,6 +749,21 @@ f1 f2 f3 ...@@ -749,6 +749,21 @@ f1 f2 f3
222222 bbbbbb 2 222222 bbbbbb 2
drop table t1; drop table t1;
Illegal ndb error code: 1186 Illegal ndb error code: 1186
CREATE TABLE t1 (
a VARBINARY(40) NOT NULL,
b VARCHAR (256) CHARACTER SET UTF8 NOT NULL,
c VARCHAR(256) CHARACTER SET UTF8 NOT NULL,
PRIMARY KEY (b,c)) ENGINE=ndbcluster;
INSERT INTO t1 VALUES
("a","ab","abc"),("b","abc","abcd"),("c","abc","ab"),("d","ab","ab"),("e","abc","abc");
SELECT * FROM t1 ORDER BY a;
a b c
a ab abc
b abc abcd
c abc ab
d ab ab
e abc abc
DROP TABLE t1;
End of 5.0 tests End of 5.0 tests
CREATE TABLE t1 (a VARCHAR(255) NOT NULL, CREATE TABLE t1 (a VARCHAR(255) NOT NULL,
CONSTRAINT pk_a PRIMARY KEY (a))engine=ndb; CONSTRAINT pk_a PRIMARY KEY (a))engine=ndb;
......
...@@ -722,8 +722,25 @@ drop table t1; ...@@ -722,8 +722,25 @@ drop table t1;
--error 1 --error 1
--exec $MY_PERROR --ndb 1186 2>&1 --exec $MY_PERROR --ndb 1186 2>&1
#
# Bug #25746 - VARCHAR UTF8 PK issue
# - prior to bugfix 4209, illegal length parameter would be
# returned in SELECT *
CREATE TABLE t1 (
a VARBINARY(40) NOT NULL,
b VARCHAR (256) CHARACTER SET UTF8 NOT NULL,
c VARCHAR(256) CHARACTER SET UTF8 NOT NULL,
PRIMARY KEY (b,c)) ENGINE=ndbcluster;
INSERT INTO t1 VALUES
("a","ab","abc"),("b","abc","abcd"),("c","abc","ab"),("d","ab","ab"),("e","abc","abc");
SELECT * FROM t1 ORDER BY a;
DROP TABLE t1;
# End of 5.0 tests
--echo End of 5.0 tests --echo End of 5.0 tests
# #
# Bug #18483 Cannot create table with FK constraint # Bug #18483 Cannot create table with FK constraint
# ndb does not support foreign key constraint, it is silently ignored # ndb does not support foreign key constraint, it is silently ignored
......
...@@ -3701,20 +3701,26 @@ void ha_ndbcluster::position(const byte *record) ...@@ -3701,20 +3701,26 @@ void ha_ndbcluster::position(const byte *record)
size_t len = key_part->length; size_t len = key_part->length;
const byte * ptr = record + key_part->offset; const byte * ptr = record + key_part->offset;
Field *field = key_part->field; Field *field = key_part->field;
if ((field->type() == MYSQL_TYPE_VARCHAR) && if (field->type() == MYSQL_TYPE_VARCHAR)
((Field_varstring*)field)->length_bytes == 1)
{ {
/** if (((Field_varstring*)field)->length_bytes == 1)
* Keys always use 2 bytes length {
*/ /**
buff[0] = ptr[0]; * Keys always use 2 bytes length
buff[1] = 0; */
memcpy(buff+2, ptr + 1, len); buff[0] = ptr[0];
len += 2; buff[1] = 0;
memcpy(buff+2, ptr + 1, len);
}
else
{
memcpy(buff, ptr, len + 2);
}
len += 2;
} }
else else
{ {
memcpy(buff, ptr, len); memcpy(buff, ptr, len);
} }
buff += len; buff += len;
} }
......
...@@ -114,7 +114,8 @@ void getTextNDBStopForced(QQQQ) { ...@@ -114,7 +114,8 @@ void getTextNDBStopForced(QQQQ) {
int sphase = theData[4]; int sphase = theData[4];
int extra = theData[5]; int extra = theData[5];
getRestartAction(theData[1],action_str); getRestartAction(theData[1],action_str);
reason_str.appfmt(" Initiated by signal %d.", signum); if (signum)
reason_str.appfmt(" Initiated by signal %d.", signum);
if (error) if (error)
{ {
ndbd_exit_classification cl; ndbd_exit_classification cl;
......
...@@ -138,7 +138,6 @@ ...@@ -138,7 +138,6 @@
#define ZNOT_FOUND 626 #define ZNOT_FOUND 626
#define ZALREADYEXIST 630 #define ZALREADYEXIST 630
#define ZINCONSISTENTHASHINDEX 892
#define ZNOTUNIQUE 893 #define ZNOTUNIQUE 893
#define ZINVALID_KEY 290 #define ZINVALID_KEY 290
......
...@@ -229,7 +229,6 @@ ErrorBundle ErrorCodes[] = { ...@@ -229,7 +229,6 @@ ErrorBundle ErrorCodes[] = {
/** /**
* Internal errors * Internal errors
*/ */
{ 892, DMEC, IE, "Inconsistent hash index. The index needs to be dropped and recreated" },
{ 896, DMEC, IE, "Tuple corrupted - wrong checksum or column data in invalid format" }, { 896, DMEC, IE, "Tuple corrupted - wrong checksum or column data in invalid format" },
{ 901, DMEC, IE, "Inconsistent ordered index. The index needs to be dropped and recreated" }, { 901, DMEC, IE, "Inconsistent ordered index. The index needs to be dropped and recreated" },
{ 202, DMEC, IE, "202" }, { 202, DMEC, IE, "202" },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment