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
f6dff046
Commit
f6dff046
authored
Feb 08, 2005
by
pekka@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - workaround to strnxfrm 5.0 problem
parent
dc6e3cf5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
5 deletions
+12
-5
ndb/src/common/util/NdbSqlUtil.cpp
ndb/src/common/util/NdbSqlUtil.cpp
+3
-0
ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp
ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp
+1
-1
ndb/test/ndbapi/testOIBasic.cpp
ndb/test/ndbapi/testOIBasic.cpp
+8
-4
No files found.
ndb/src/common/util/NdbSqlUtil.cpp
View file @
f6dff046
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <NdbSqlUtil.hpp>
#include <NdbSqlUtil.hpp>
#include <NdbOut.hpp>
int
int
NdbSqlUtil
::
char_compare
(
const
char
*
s1
,
unsigned
n1
,
NdbSqlUtil
::
char_compare
(
const
char
*
s1
,
unsigned
n1
,
...
@@ -858,6 +859,8 @@ NdbSqlUtil::strnxfrm_bug7284(CHARSET_INFO* cs, unsigned char* dst, unsigned dstL
...
@@ -858,6 +859,8 @@ NdbSqlUtil::strnxfrm_bug7284(CHARSET_INFO* cs, unsigned char* dst, unsigned dstL
int
n2
=
(
*
cs
->
coll
->
strnxfrm
)(
cs
,
xsp
,
sizeof
(
xsp
),
nsp
,
n1
);
int
n2
=
(
*
cs
->
coll
->
strnxfrm
)(
cs
,
xsp
,
sizeof
(
xsp
),
nsp
,
n1
);
if
(
n2
<=
0
)
if
(
n2
<=
0
)
return
-
1
;
return
-
1
;
// XXX bug workaround - strnxfrm may not write full string
memset
(
dst
,
0x0
,
dstLen
);
// strxfrm argument string - returns no error indication
// strxfrm argument string - returns no error indication
int
n3
=
(
*
cs
->
coll
->
strnxfrm
)(
cs
,
dst
,
dstLen
,
src
,
srcLen
);
int
n3
=
(
*
cs
->
coll
->
strnxfrm
)(
cs
,
dst
,
dstLen
,
src
,
srcLen
);
// pad with strxfrm-ed space chars
// pad with strxfrm-ed space chars
...
...
ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp
View file @
f6dff046
...
@@ -250,7 +250,7 @@ Dbtux::readKeyAttrs(const Frag& frag, TreeEnt ent, unsigned start, Data keyData)
...
@@ -250,7 +250,7 @@ Dbtux::readKeyAttrs(const Frag& frag, TreeEnt ent, unsigned start, Data keyData)
debugOut
<<
"readKeyAttrs:"
<<
endl
;
debugOut
<<
"readKeyAttrs:"
<<
endl
;
ConstData
data
=
keyData
;
ConstData
data
=
keyData
;
Uint32
totalSize
=
0
;
Uint32
totalSize
=
0
;
for
(
Uint32
i
=
start
;
i
<
numAttrs
;
i
++
)
{
for
(
Uint32
i
=
start
;
i
<
frag
.
m_
numAttrs
;
i
++
)
{
Uint32
attrId
=
data
.
ah
().
getAttributeId
();
Uint32
attrId
=
data
.
ah
().
getAttributeId
();
Uint32
dataSize
=
data
.
ah
().
getDataSize
();
Uint32
dataSize
=
data
.
ah
().
getDataSize
();
debugOut
<<
i
<<
" attrId="
<<
attrId
<<
" size="
<<
dataSize
;
debugOut
<<
i
<<
" attrId="
<<
attrId
<<
" size="
<<
dataSize
;
...
...
ndb/test/ndbapi/testOIBasic.cpp
View file @
f6dff046
...
@@ -1812,14 +1812,16 @@ Val::calckeychars(Par par, unsigned i, unsigned& n, unsigned char* buf)
...
@@ -1812,14 +1812,16 @@ Val::calckeychars(Par par, unsigned i, unsigned& n, unsigned char* buf)
const
Chs
*
chs
=
col
.
m_chs
;
const
Chs
*
chs
=
col
.
m_chs
;
CHARSET_INFO
*
cs
=
chs
->
m_cs
;
CHARSET_INFO
*
cs
=
chs
->
m_cs
;
n
=
0
;
n
=
0
;
// our random chars may not fill value exactly
unsigned
len
=
0
;
while
(
n
+
cs
->
mbmaxlen
<=
col
.
m_byte
length
)
{
while
(
len
<
col
.
m_
length
)
{
if
(
i
%
(
1
+
n
)
==
0
)
{
if
(
i
%
(
1
+
n
)
==
0
)
{
break
;
break
;
}
}
const
Chr
&
chr
=
chs
->
m_chr
[
i
%
maxcharcount
];
const
Chr
&
chr
=
chs
->
m_chr
[
i
%
maxcharcount
];
assert
(
n
+
chr
.
m_size
<=
col
.
m_bytelength
);
memcpy
(
buf
+
n
,
chr
.
m_bytes
,
chr
.
m_size
);
memcpy
(
buf
+
n
,
chr
.
m_bytes
,
chr
.
m_size
);
n
+=
chr
.
m_size
;
n
+=
chr
.
m_size
;
len
++
;
}
}
}
}
...
@@ -1884,8 +1886,8 @@ Val::calcnokeychars(Par par, unsigned& n, unsigned char* buf)
...
@@ -1884,8 +1886,8 @@ Val::calcnokeychars(Par par, unsigned& n, unsigned char* buf)
const
Chs
*
chs
=
col
.
m_chs
;
const
Chs
*
chs
=
col
.
m_chs
;
CHARSET_INFO
*
cs
=
chs
->
m_cs
;
CHARSET_INFO
*
cs
=
chs
->
m_cs
;
n
=
0
;
n
=
0
;
// our random chars may not fill value exactly
unsigned
len
=
0
;
while
(
n
+
cs
->
mbmaxlen
<=
col
.
m_byte
length
)
{
while
(
len
<
col
.
m_
length
)
{
if
(
urandom
(
1
+
col
.
m_bytelength
)
==
0
)
{
if
(
urandom
(
1
+
col
.
m_bytelength
)
==
0
)
{
break
;
break
;
}
}
...
@@ -1898,8 +1900,10 @@ Val::calcnokeychars(Par par, unsigned& n, unsigned char* buf)
...
@@ -1898,8 +1900,10 @@ Val::calcnokeychars(Par par, unsigned& n, unsigned char* buf)
unsigned
i
=
half
+
r
;
unsigned
i
=
half
+
r
;
assert
(
i
<
maxcharcount
);
assert
(
i
<
maxcharcount
);
const
Chr
&
chr
=
chs
->
m_chr
[
i
];
const
Chr
&
chr
=
chs
->
m_chr
[
i
];
assert
(
n
+
chr
.
m_size
<=
col
.
m_bytelength
);
memcpy
(
buf
+
n
,
chr
.
m_bytes
,
chr
.
m_size
);
memcpy
(
buf
+
n
,
chr
.
m_bytes
,
chr
.
m_size
);
n
+=
chr
.
m_size
;
n
+=
chr
.
m_size
;
len
++
;
}
}
}
}
...
...
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