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
44dcec99
Commit
44dcec99
authored
Apr 10, 2005
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - testOIBasic.cpp: 4.1->5.0 fix
ndb/test/ndbapi/testOIBasic.cpp: 4.1->5.0 fix
parent
120352af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
ndb/test/ndbapi/testOIBasic.cpp
ndb/test/ndbapi/testOIBasic.cpp
+9
-5
No files found.
ndb/test/ndbapi/testOIBasic.cpp
View file @
44dcec99
...
@@ -482,16 +482,17 @@ Chs::Chs(CHARSET_INFO* cs) :
...
@@ -482,16 +482,17 @@ Chs::Chs(CHARSET_INFO* cs) :
for
(
unsigned
j
=
0
;
j
<
size
;
j
++
)
{
for
(
unsigned
j
=
0
;
j
<
size
;
j
++
)
{
bytes
[
j
]
=
urandom
(
256
);
bytes
[
j
]
=
urandom
(
256
);
}
}
int
not_used
;
// check wellformed
// check wellformed
const
char
*
sbytes
=
(
const
char
*
)
bytes
;
const
char
*
sbytes
=
(
const
char
*
)
bytes
;
if
((
*
cs
->
cset
->
well_formed_len
)(
cs
,
sbytes
,
sbytes
+
size
,
1
)
!=
size
)
{
if
((
*
cs
->
cset
->
well_formed_len
)(
cs
,
sbytes
,
sbytes
+
size
,
1
,
&
not_used
)
!=
size
)
{
miss1
++
;
miss1
++
;
continue
;
continue
;
}
}
// check no proper prefix wellformed
// check no proper prefix wellformed
ok
=
true
;
ok
=
true
;
for
(
unsigned
j
=
1
;
j
<
size
;
j
++
)
{
for
(
unsigned
j
=
1
;
j
<
size
;
j
++
)
{
if
((
*
cs
->
cset
->
well_formed_len
)(
cs
,
sbytes
,
sbytes
+
j
,
1
)
==
j
)
{
if
((
*
cs
->
cset
->
well_formed_len
)(
cs
,
sbytes
,
sbytes
+
j
,
1
,
&
not_used
)
==
j
)
{
ok
=
false
;
ok
=
false
;
break
;
break
;
}
}
...
@@ -676,7 +677,8 @@ Col::wellformed(const void* addr) const
...
@@ -676,7 +677,8 @@ Col::wellformed(const void* addr) const
CHARSET_INFO
*
cs
=
m_chs
->
m_cs
;
CHARSET_INFO
*
cs
=
m_chs
->
m_cs
;
const
char
*
src
=
(
const
char
*
)
addr
;
const
char
*
src
=
(
const
char
*
)
addr
;
unsigned
len
=
m_bytelength
;
unsigned
len
=
m_bytelength
;
assert
((
*
cs
->
cset
->
well_formed_len
)(
cs
,
src
,
src
+
len
,
0xffff
)
==
len
);
int
not_used
;
assert
((
*
cs
->
cset
->
well_formed_len
)(
cs
,
src
,
src
+
len
,
0xffff
,
&
not_used
)
==
len
);
}
}
break
;
break
;
case
Col
:
:
Varchar
:
case
Col
:
:
Varchar
:
...
@@ -685,8 +687,9 @@ Col::wellformed(const void* addr) const
...
@@ -685,8 +687,9 @@ Col::wellformed(const void* addr) const
const
unsigned
char
*
src
=
(
const
unsigned
char
*
)
addr
;
const
unsigned
char
*
src
=
(
const
unsigned
char
*
)
addr
;
const
char
*
ssrc
=
(
const
char
*
)
src
;
const
char
*
ssrc
=
(
const
char
*
)
src
;
unsigned
len
=
src
[
0
];
unsigned
len
=
src
[
0
];
int
not_used
;
assert
(
len
<=
m_bytelength
);
assert
(
len
<=
m_bytelength
);
assert
((
*
cs
->
cset
->
well_formed_len
)(
cs
,
ssrc
+
1
,
ssrc
+
1
+
len
,
0xffff
)
==
len
);
assert
((
*
cs
->
cset
->
well_formed_len
)(
cs
,
ssrc
+
1
,
ssrc
+
1
+
len
,
0xffff
,
&
not_used
)
==
len
);
}
}
break
;
break
;
case
Col
:
:
Longvarchar
:
case
Col
:
:
Longvarchar
:
...
@@ -695,8 +698,9 @@ Col::wellformed(const void* addr) const
...
@@ -695,8 +698,9 @@ Col::wellformed(const void* addr) const
const
unsigned
char
*
src
=
(
const
unsigned
char
*
)
addr
;
const
unsigned
char
*
src
=
(
const
unsigned
char
*
)
addr
;
const
char
*
ssrc
=
(
const
char
*
)
src
;
const
char
*
ssrc
=
(
const
char
*
)
src
;
unsigned
len
=
src
[
0
]
+
(
src
[
1
]
<<
8
);
unsigned
len
=
src
[
0
]
+
(
src
[
1
]
<<
8
);
int
not_used
;
assert
(
len
<=
m_bytelength
);
assert
(
len
<=
m_bytelength
);
assert
((
*
cs
->
cset
->
well_formed_len
)(
cs
,
ssrc
+
2
,
ssrc
+
2
+
len
,
0xffff
)
==
len
);
assert
((
*
cs
->
cset
->
well_formed_len
)(
cs
,
ssrc
+
2
,
ssrc
+
2
+
len
,
0xffff
,
&
not_used
)
==
len
);
}
}
break
;
break
;
default:
default:
...
...
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