mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge perch.ndb.mysql.com:/home/jonas/src/mysql-5.0
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new mysql-test/r/ndb_basic.result: Auto merged mysql-test/t/ndb_basic.test: Auto merged sql/ha_ndbcluster.cc: Auto merged storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp: Auto merged storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: Auto merged storage/ndb/src/kernel/vm/SimulatedBlock.cpp: merge storage/ndb/src/ndbapi/ndberror.c: merge
This commit is contained in:
@ -677,3 +677,19 @@ select * from atablewithareallylongandirritatingname;
|
|||||||
a
|
a
|
||||||
2
|
2
|
||||||
drop table atablewithareallylongandirritatingname;
|
drop table atablewithareallylongandirritatingname;
|
||||||
|
create table t1 (f1 varchar(50), f2 text,f3 int, primary key(f1)) engine=NDB;
|
||||||
|
insert into t1 (f1,f2,f3)VALUES("111111","aaaaaa",1);
|
||||||
|
insert into t1 (f1,f2,f3)VALUES("222222","bbbbbb",2);
|
||||||
|
select * from t1 order by f1;
|
||||||
|
f1 f2 f3
|
||||||
|
111111 aaaaaa 1
|
||||||
|
222222 bbbbbb 2
|
||||||
|
select * from t1 order by f2;
|
||||||
|
f1 f2 f3
|
||||||
|
111111 aaaaaa 1
|
||||||
|
222222 bbbbbb 2
|
||||||
|
select * from t1 order by f3;
|
||||||
|
f1 f2 f3
|
||||||
|
111111 aaaaaa 1
|
||||||
|
222222 bbbbbb 2
|
||||||
|
drop table t1;
|
||||||
|
@ -623,3 +623,14 @@ create table atablewithareallylongandirritatingname (a int);
|
|||||||
insert into atablewithareallylongandirritatingname values (2);
|
insert into atablewithareallylongandirritatingname values (2);
|
||||||
select * from atablewithareallylongandirritatingname;
|
select * from atablewithareallylongandirritatingname;
|
||||||
drop table atablewithareallylongandirritatingname;
|
drop table atablewithareallylongandirritatingname;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#15682
|
||||||
|
#
|
||||||
|
create table t1 (f1 varchar(50), f2 text,f3 int, primary key(f1)) engine=NDB;
|
||||||
|
insert into t1 (f1,f2,f3)VALUES("111111","aaaaaa",1);
|
||||||
|
insert into t1 (f1,f2,f3)VALUES("222222","bbbbbb",2);
|
||||||
|
select * from t1 order by f1;
|
||||||
|
select * from t1 order by f2;
|
||||||
|
select * from t1 order by f3;
|
||||||
|
drop table t1;
|
||||||
|
@ -3014,8 +3014,26 @@ void ha_ndbcluster::position(const byte *record)
|
|||||||
}
|
}
|
||||||
*buff++= 0;
|
*buff++= 0;
|
||||||
}
|
}
|
||||||
memcpy(buff, record + key_part->offset, key_part->length);
|
|
||||||
buff += key_part->length;
|
size_t len = key_part->length;
|
||||||
|
const byte * ptr = record + key_part->offset;
|
||||||
|
Field *field = key_part->field;
|
||||||
|
if ((field->type() == MYSQL_TYPE_VARCHAR) &&
|
||||||
|
((Field_varstring*)field)->length_bytes == 1)
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Keys always use 2 bytes length
|
||||||
|
*/
|
||||||
|
buff[0] = ptr[0];
|
||||||
|
buff[1] = 0;
|
||||||
|
memcpy(buff+2, ptr + 1, len);
|
||||||
|
len += 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
memcpy(buff, ptr, len);
|
||||||
|
}
|
||||||
|
buff += len;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -141,6 +141,8 @@
|
|||||||
#define ZALREADYEXIST 630
|
#define ZALREADYEXIST 630
|
||||||
#define ZINCONSISTENTHASHINDEX 892
|
#define ZINCONSISTENTHASHINDEX 892
|
||||||
#define ZNOTUNIQUE 893
|
#define ZNOTUNIQUE 893
|
||||||
|
|
||||||
|
#define ZINVALID_KEY 290
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class Dbtc: public SimulatedBlock {
|
class Dbtc: public SimulatedBlock {
|
||||||
|
@ -2314,7 +2314,10 @@ Dbtc::handle_special_hash(Uint32 dstHash[4], Uint32* src, Uint32 srcLen,
|
|||||||
{
|
{
|
||||||
keyPartLenPtr = keyPartLen;
|
keyPartLenPtr = keyPartLen;
|
||||||
dstPos = xfrm_key(tabPtrI, src, dst, sizeof(Tmp) >> 2, keyPartLenPtr);
|
dstPos = xfrm_key(tabPtrI, src, dst, sizeof(Tmp) >> 2, keyPartLenPtr);
|
||||||
ndbrequire(dstPos);
|
if (unlikely(dstPos == 0))
|
||||||
|
{
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2335,6 +2338,10 @@ Dbtc::handle_special_hash(Uint32 dstHash[4], Uint32* src, Uint32 srcLen,
|
|||||||
dstHash[1] = tmp[1];
|
dstHash[1] = tmp[1];
|
||||||
}
|
}
|
||||||
return true; // success
|
return true; // success
|
||||||
|
|
||||||
|
error:
|
||||||
|
terrorCode = ZINVALID_KEY;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -2944,7 +2951,15 @@ void Dbtc::tckeyreq050Lab(Signal* signal)
|
|||||||
UintR tnoOfStandby;
|
UintR tnoOfStandby;
|
||||||
UintR tnodeinfo;
|
UintR tnodeinfo;
|
||||||
|
|
||||||
|
terrorCode = 0;
|
||||||
|
|
||||||
hash(signal); /* NOW IT IS TIME TO CALCULATE THE HASH VALUE*/
|
hash(signal); /* NOW IT IS TIME TO CALCULATE THE HASH VALUE*/
|
||||||
|
|
||||||
|
if (unlikely(terrorCode))
|
||||||
|
{
|
||||||
|
releaseAtErrorLab(signal);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
CacheRecord * const regCachePtr = cachePtr.p;
|
CacheRecord * const regCachePtr = cachePtr.p;
|
||||||
TcConnectRecord * const regTcPtr = tcConnectptr.p;
|
TcConnectRecord * const regTcPtr = tcConnectptr.p;
|
||||||
|
@ -236,6 +236,7 @@ ErrorBundle ErrorCodes[] = {
|
|||||||
{ 277, DMEC, IE, "277" },
|
{ 277, DMEC, IE, "277" },
|
||||||
{ 278, DMEC, IE, "278" },
|
{ 278, DMEC, IE, "278" },
|
||||||
{ 287, DMEC, IE, "Index corrupted" },
|
{ 287, DMEC, IE, "Index corrupted" },
|
||||||
|
{ 290, DMEC, IE, "Corrupt key in TC, unable to xfrm" },
|
||||||
{ 631, DMEC, IE, "631" },
|
{ 631, DMEC, IE, "631" },
|
||||||
{ 632, DMEC, IE, "632" },
|
{ 632, DMEC, IE, "632" },
|
||||||
{ 702, DMEC, IE, "Request to non-master" },
|
{ 702, DMEC, IE, "Request to non-master" },
|
||||||
@ -303,7 +304,6 @@ ErrorBundle ErrorCodes[] = {
|
|||||||
{ 4608, DMEC, AE, "You can not takeOverScan unless you have used openScanExclusive"},
|
{ 4608, DMEC, AE, "You can not takeOverScan unless you have used openScanExclusive"},
|
||||||
{ 4609, DMEC, AE, "You must call nextScanResult before trying to takeOverScan"},
|
{ 4609, DMEC, AE, "You must call nextScanResult before trying to takeOverScan"},
|
||||||
{ 4232, DMEC, AE, "Parallelism can only be between 1 and 240" },
|
{ 4232, DMEC, AE, "Parallelism can only be between 1 and 240" },
|
||||||
{ 290, DMEC, AE, "Scan not started or has been closed by kernel due to timeout" },
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event schema errors
|
* Event schema errors
|
||||||
|
Reference in New Issue
Block a user