mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Merge poseidon.mysql.com:/home/tomas/mysql-5.0-ndb
into poseidon.mysql.com:/home/tomas/mysql-5.1-new-ndb
This commit is contained in:
@@ -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;
|
|||||||
--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)
|
|||||||
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) {
|
|||||||
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 @@
|
|||||||
|
|
||||||
#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[] = {
|
|||||||
/**
|
/**
|
||||||
* 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" },
|
||||||
|
Reference in New Issue
Block a user