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
b674d2c9
Commit
b674d2c9
authored
May 29, 2009
by
Narayanan V
Browse files
Options
Browse Files
Download
Plain Diff
merging with mysql-5.1-bugteam tree
parents
b4a725c4
858e118a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
storage/ibmdb2i/db2i_conversion.cc
storage/ibmdb2i/db2i_conversion.cc
+2
-2
storage/ibmdb2i/db2i_misc.h
storage/ibmdb2i/db2i_misc.h
+16
-0
No files found.
storage/ibmdb2i/db2i_conversion.cc
View file @
b674d2c9
...
...
@@ -1085,7 +1085,7 @@ int32 ha_ibmdb2i::convertMySQLtoDB2(Field* field, const DB2Field& db2Field, char
if
(
bytesToStore
)
memcpy
(
db2Buf
,
dataToStore
,
bytesToStore
);
if
(
bytesToPad
)
wmemset
((
wchar_t
*
)
(
db2Buf
+
bytesToStore
),
0x0020
,
bytesToPad
/
2
);
memset16
(
(
db2Buf
+
bytesToStore
),
0x0020
,
bytesToPad
/
2
);
}
else
{
...
...
@@ -1108,7 +1108,7 @@ int32 ha_ibmdb2i::convertMySQLtoDB2(Field* field, const DB2Field& db2Field, char
bytesToStore
=
db2BytesToStore
;
}
if
(
db2BytesToStore
<
maxDb2BytesToStore
)
// If need to pad
wmemset
((
wchar_t
*
)
(
db2Buf
+
db2BytesToStore
),
0x0020
,
(
maxDb2BytesToStore
-
db2BytesToStore
)
/
2
);
memset16
(
(
db2Buf
+
db2BytesToStore
),
0x0020
,
(
maxDb2BytesToStore
-
db2BytesToStore
)
/
2
);
}
if
(
db2FieldType
==
QMY_VARGRAPHIC
)
...
...
storage/ibmdb2i/db2i_misc.h
View file @
b674d2c9
...
...
@@ -110,4 +110,20 @@ bool isOrdinaryIdentifier(const char* s)
return
true
;
}
/**
Fill memory with a 16-bit word.
@param p Pointer to space to fill.
@param v Value to fill
@param l Length of space (in 16-bit words)
*/
void
memset16
(
void
*
p
,
uint16
v
,
size_t
l
)
{
uint16
*
p2
=
(
uint16
*
)
p
;
while
(
l
--
)
{
*
(
p2
++
)
=
v
;
}
}
#endif
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