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
3e18dfb6
Commit
3e18dfb6
authored
Nov 11, 2009
by
Magne Mahre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix of incorrect casting for large sizes
parent
ab061391
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
include/m_string.h
include/m_string.h
+7
-8
No files found.
include/m_string.h
View file @
3e18dfb6
...
...
@@ -311,18 +311,17 @@ typedef struct st_mysql_lex_string LEX_STRING;
static
inline
const
uchar
*
skip_trailing_space
(
const
uchar
*
ptr
,
size_t
len
)
{
const
uchar
*
start
=
ptr
;
const
uchar
*
end
=
ptr
+
len
;
if
(
len
>
20
)
{
const
uchar
*
end_words
=
(
const
uchar
*
)
(((
intptr
)
end
)
/
SIZEOF_INT
*
SIZEOF_INT
);
const
uchar
*
start_words
=
(
const
uchar
*
)
((((
intptr
)
start
)
+
SIZEOF_INT
-
1
)
/
SIZEOF_INT
*
SIZEOF_INT
);
const
uchar
*
end_words
=
(
const
uchar
*
)
(
intptr
)
(((
ulonglong
)(
intptr
)
end
)
/
SIZEOF_INT
*
SIZEOF_INT
);
const
uchar
*
start_words
=
(
const
uchar
*
)
(
intptr
)
((((
ulonglong
)(
intptr
)
ptr
)
+
SIZEOF_INT
-
1
)
/
SIZEOF_INT
*
SIZEOF_INT
);
DBUG_ASSERT
(((
intptr
)
start
)
>=
SIZEOF_INT
);
if
(
end_words
>
start
)
DBUG_ASSERT
(((
ulonglong
)(
intptr
)
ptr
)
>=
SIZEOF_INT
);
if
(
end_words
>
ptr
)
{
while
(
end
>
end_words
&&
end
[
-
1
]
==
0x20
)
end
--
;
...
...
@@ -331,7 +330,7 @@ static inline const uchar *skip_trailing_space(const uchar *ptr,size_t len)
end
-=
SIZEOF_INT
;
}
}
while
(
end
>
start
&&
end
[
-
1
]
==
0x20
)
while
(
end
>
ptr
&&
end
[
-
1
]
==
0x20
)
end
--
;
return
(
end
);
}
...
...
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