Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
ae66c0b6
Commit
ae66c0b6
authored
Dec 14, 2005
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new
parents
64580538
4454e7a6
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
66 additions
and
4 deletions
+66
-4
mysql-test/r/ndb_basic.result
mysql-test/r/ndb_basic.result
+16
-0
mysql-test/t/ndb_basic.test
mysql-test/t/ndb_basic.test
+11
-0
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+20
-2
storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
+2
-0
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
+16
-1
storage/ndb/src/ndbapi/ndberror.c
storage/ndb/src/ndbapi/ndberror.c
+1
-1
No files found.
mysql-test/r/ndb_basic.result
View file @
ae66c0b6
...
...
@@ -677,3 +677,19 @@ select * from atablewithareallylongandirritatingname;
a
2
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;
mysql-test/t/ndb_basic.test
View file @
ae66c0b6
...
...
@@ -623,3 +623,14 @@ create table atablewithareallylongandirritatingname (a int);
insert
into
atablewithareallylongandirritatingname
values
(
2
);
select
*
from
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
;
sql/ha_ndbcluster.cc
View file @
ae66c0b6
...
...
@@ -3014,8 +3014,26 @@ void ha_ndbcluster::position(const byte *record)
}
*
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
...
...
storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
View file @
ae66c0b6
...
...
@@ -141,6 +141,8 @@
#define ZALREADYEXIST 630
#define ZINCONSISTENTHASHINDEX 892
#define ZNOTUNIQUE 893
#define ZINVALID_KEY 290
#endif
class
Dbtc
:
public
SimulatedBlock
{
...
...
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
View file @
ae66c0b6
...
...
@@ -2314,7 +2314,10 @@ Dbtc::handle_special_hash(Uint32 dstHash[4], Uint32* src, Uint32 srcLen,
{
keyPartLenPtr
=
keyPartLen
;
dstPos
=
xfrm_key
(
tabPtrI
,
src
,
dst
,
sizeof
(
Tmp
)
>>
2
,
keyPartLenPtr
);
ndbrequire
(
dstPos
);
if
(
unlikely
(
dstPos
==
0
))
{
goto
error
;
}
}
else
{
...
...
@@ -2335,6 +2338,10 @@ Dbtc::handle_special_hash(Uint32 dstHash[4], Uint32* src, Uint32 srcLen,
dstHash
[
1
]
=
tmp
[
1
];
}
return
true
;
// success
error:
terrorCode
=
ZINVALID_KEY
;
return
false
;
}
/*
...
...
@@ -2944,8 +2951,16 @@ void Dbtc::tckeyreq050Lab(Signal* signal)
UintR
tnoOfStandby
;
UintR
tnodeinfo
;
terrorCode
=
0
;
hash
(
signal
);
/* NOW IT IS TIME TO CALCULATE THE HASH VALUE*/
if
(
unlikely
(
terrorCode
))
{
releaseAtErrorLab
(
signal
);
return
;
}
CacheRecord
*
const
regCachePtr
=
cachePtr
.
p
;
TcConnectRecord
*
const
regTcPtr
=
tcConnectptr
.
p
;
ApiConnectRecord
*
const
regApiPtr
=
apiConnectptr
.
p
;
...
...
storage/ndb/src/ndbapi/ndberror.c
View file @
ae66c0b6
...
...
@@ -236,6 +236,7 @@ ErrorBundle ErrorCodes[] = {
{
277
,
DMEC
,
IE
,
"277"
},
{
278
,
DMEC
,
IE
,
"278"
},
{
287
,
DMEC
,
IE
,
"Index corrupted"
},
{
290
,
DMEC
,
IE
,
"Corrupt key in TC, unable to xfrm"
},
{
631
,
DMEC
,
IE
,
"631"
},
{
632
,
DMEC
,
IE
,
"632"
},
{
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"
},
{
4609
,
DMEC
,
AE
,
"You must call nextScanResult before trying to takeOverScan"
},
{
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment