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
c709ad87
Commit
c709ad87
authored
Feb 22, 2005
by
bar@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
field.cc:
optimize test_if_minus() when not UCS2 support is compiled.
parent
97f18ad1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
sql/field.cc
sql/field.cc
+11
-1
No files found.
sql/field.cc
View file @
c709ad87
...
...
@@ -1776,13 +1776,23 @@ void Field_medium::sql_type(String &res) const
** long int
****************************************************************************/
/*
A helper function to check whether the next character
in the string "s" is MINUS SIGN.
*/
#ifdef HAVE_CHARSET_ucs2
static
bool
test_if_minus
(
CHARSET_INFO
*
cs
,
const
char
*
s
,
const
char
*
e
)
{
my_wc_t
wc
;
return
cs
->
cset
->
mb_wc
(
cs
,
&
wc
,
(
uchar
*
)
s
,
(
uchar
*
)
e
)
>
0
&&
wc
==
'-'
;
}
#else
/*
If not UCS2 support is compiled then it is easier
*/
#define test_if_minus(cs, s, e) (*s == '-')
#endif
int
Field_long
::
store
(
const
char
*
from
,
uint
len
,
CHARSET_INFO
*
cs
)
...
...
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