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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
57722e13
Commit
57722e13
authored
Dec 14, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-push
parents
97746386
ed5f4d69
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
72 additions
and
6 deletions
+72
-6
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
ndb/src/kernel/blocks/dbtc/Dbtc.hpp
ndb/src/kernel/blocks/dbtc/Dbtc.hpp
+2
-0
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
+16
-1
ndb/src/kernel/vm/SimulatedBlock.cpp
ndb/src/kernel/vm/SimulatedBlock.cpp
+6
-2
ndb/src/ndbapi/ndberror.c
ndb/src/ndbapi/ndberror.c
+1
-1
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+20
-2
No files found.
mysql-test/r/ndb_basic.result
View file @
57722e13
...
@@ -677,3 +677,19 @@ select * from atablewithareallylongandirritatingname;
...
@@ -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;
mysql-test/t/ndb_basic.test
View file @
57722e13
...
@@ -623,3 +623,14 @@ create table atablewithareallylongandirritatingname (a int);
...
@@ -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
;
ndb/src/kernel/blocks/dbtc/Dbtc.hpp
View file @
57722e13
...
@@ -141,6 +141,8 @@
...
@@ -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
{
...
...
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
View file @
57722e13
...
@@ -2313,7 +2313,10 @@ Dbtc::handle_special_hash(Uint32 dstHash[4], Uint32* src, Uint32 srcLen,
...
@@ -2313,7 +2313,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
{
{
...
@@ -2334,6 +2337,10 @@ Dbtc::handle_special_hash(Uint32 dstHash[4], Uint32* src, Uint32 srcLen,
...
@@ -2334,6 +2337,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
;
}
}
/*
/*
...
@@ -2941,7 +2948,15 @@ void Dbtc::tckeyreq050Lab(Signal* signal)
...
@@ -2941,7 +2948,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
;
...
...
ndb/src/kernel/vm/SimulatedBlock.cpp
View file @
57722e13
...
@@ -1872,6 +1872,8 @@ SimulatedBlock::xfrm_key(Uint32 tab, const Uint32* src,
...
@@ -1872,6 +1872,8 @@ SimulatedBlock::xfrm_key(Uint32 tab, const Uint32* src,
xfrm_attr
(
keyAttr
.
attributeDescriptor
,
keyAttr
.
charsetInfo
,
xfrm_attr
(
keyAttr
.
attributeDescriptor
,
keyAttr
.
charsetInfo
,
src
,
srcPos
,
dst
,
dstPos
,
dstSize
);
src
,
srcPos
,
dst
,
dstPos
,
dstSize
);
keyPartLen
[
i
++
]
=
dstWords
;
keyPartLen
[
i
++
]
=
dstWords
;
if
(
unlikely
(
dstWords
==
0
))
return
0
;
}
}
return
dstPos
;
return
dstPos
;
...
@@ -1900,7 +1902,8 @@ SimulatedBlock::xfrm_attr(Uint32 attrDesc, CHARSET_INFO* cs,
...
@@ -1900,7 +1902,8 @@ SimulatedBlock::xfrm_attr(Uint32 attrDesc, CHARSET_INFO* cs,
Uint32
typeId
=
AttributeDescriptor
::
getType
(
attrDesc
);
Uint32
typeId
=
AttributeDescriptor
::
getType
(
attrDesc
);
Uint32
lb
,
len
;
Uint32
lb
,
len
;
bool
ok
=
NdbSqlUtil
::
get_var_length
(
typeId
,
srcPtr
,
srcBytes
,
lb
,
len
);
bool
ok
=
NdbSqlUtil
::
get_var_length
(
typeId
,
srcPtr
,
srcBytes
,
lb
,
len
);
ndbrequire
(
ok
);
if
(
unlikely
(
!
ok
))
return
0
;
Uint32
xmul
=
cs
->
strxfrm_multiply
;
Uint32
xmul
=
cs
->
strxfrm_multiply
;
if
(
xmul
==
0
)
if
(
xmul
==
0
)
xmul
=
1
;
xmul
=
1
;
...
@@ -1911,7 +1914,8 @@ SimulatedBlock::xfrm_attr(Uint32 attrDesc, CHARSET_INFO* cs,
...
@@ -1911,7 +1914,8 @@ SimulatedBlock::xfrm_attr(Uint32 attrDesc, CHARSET_INFO* cs,
Uint32
dstLen
=
xmul
*
(
srcBytes
-
lb
);
Uint32
dstLen
=
xmul
*
(
srcBytes
-
lb
);
ndbrequire
(
dstLen
<=
((
dstSize
-
dstPos
)
<<
2
));
ndbrequire
(
dstLen
<=
((
dstSize
-
dstPos
)
<<
2
));
int
n
=
NdbSqlUtil
::
strnxfrm_bug7284
(
cs
,
dstPtr
,
dstLen
,
srcPtr
+
lb
,
len
);
int
n
=
NdbSqlUtil
::
strnxfrm_bug7284
(
cs
,
dstPtr
,
dstLen
,
srcPtr
+
lb
,
len
);
ndbrequire
(
n
!=
-
1
);
if
(
unlikely
(
n
==
-
1
))
return
0
;
while
((
n
&
3
)
!=
0
)
while
((
n
&
3
)
!=
0
)
{
{
dstPtr
[
n
++
]
=
0
;
dstPtr
[
n
++
]
=
0
;
...
...
ndb/src/ndbapi/ndberror.c
View file @
57722e13
...
@@ -227,6 +227,7 @@ ErrorBundle ErrorCodes[] = {
...
@@ -227,6 +227,7 @@ ErrorBundle ErrorCodes[] = {
{
277
,
IE
,
"277"
},
{
277
,
IE
,
"277"
},
{
278
,
IE
,
"278"
},
{
278
,
IE
,
"278"
},
{
287
,
IE
,
"Index corrupted"
},
{
287
,
IE
,
"Index corrupted"
},
{
290
,
IE
,
"Corrupt key in TC, unable to xfrm"
},
{
631
,
IE
,
"631"
},
{
631
,
IE
,
"631"
},
{
632
,
IE
,
"632"
},
{
632
,
IE
,
"632"
},
{
702
,
IE
,
"Request to non-master"
},
{
702
,
IE
,
"Request to non-master"
},
...
@@ -295,7 +296,6 @@ ErrorBundle ErrorCodes[] = {
...
@@ -295,7 +296,6 @@ ErrorBundle ErrorCodes[] = {
{
4608
,
AE
,
"You can not takeOverScan unless you have used openScanExclusive"
},
{
4608
,
AE
,
"You can not takeOverScan unless you have used openScanExclusive"
},
{
4609
,
AE
,
"You must call nextScanResult before trying to takeOverScan"
},
{
4609
,
AE
,
"You must call nextScanResult before trying to takeOverScan"
},
{
4232
,
AE
,
"Parallelism can only be between 1 and 240"
},
{
4232
,
AE
,
"Parallelism can only be between 1 and 240"
},
{
290
,
AE
,
"Scan not started or has been closed by kernel due to timeout"
},
/**
/**
* Event schema errors
* Event schema errors
...
...
sql/ha_ndbcluster.cc
View file @
57722e13
...
@@ -2812,8 +2812,26 @@ void ha_ndbcluster::position(const byte *record)
...
@@ -2812,8 +2812,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
...
...
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