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
847ea719
Commit
847ea719
authored
Nov 28, 2002
by
bar@bar.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New functions
parent
a3ae370d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
16 deletions
+16
-16
sql/item.h
sql/item.h
+2
-2
sql/item_func.h
sql/item_func.h
+2
-2
sql/item_sum.h
sql/item_sum.h
+2
-2
strings/ctype-simple.c
strings/ctype-simple.c
+10
-10
No files found.
sql/item.h
View file @
847ea719
...
...
@@ -536,9 +536,9 @@ public:
enum
Type
type
()
const
{
return
COPY_STR_ITEM
;
}
enum
Item_result
result_type
()
const
{
return
STRING_RESULT
;
}
double
val
()
{
return
null_value
?
0.0
:
atof
(
str_value
.
c_ptr
()
);
}
{
return
null_value
?
0.0
:
my_strntod
(
str_value
.
charset
(),
str_value
.
ptr
(),
str_value
.
length
(),
NULL
);
}
longlong
val_int
()
{
return
null_value
?
LL
(
0
)
:
strtoll
(
str_value
.
c_ptr
(),(
char
**
)
0
,
10
);
}
{
return
null_value
?
LL
(
0
)
:
my_strntoll
(
str_value
.
charset
(),
str_value
.
ptr
(),
str_value
.
length
(),(
char
**
)
0
,
10
);
}
String
*
val_str
(
String
*
);
void
make_field
(
Send_field
*
field
)
{
item
->
make_field
(
field
);
}
void
copy
();
...
...
sql/item_func.h
View file @
847ea719
...
...
@@ -801,12 +801,12 @@ public:
double
val
()
{
String
*
res
;
res
=
val_str
(
&
str_value
);
return
res
?
atof
(
res
->
c_ptr
()
)
:
0.0
;
return
res
?
my_strntod
(
res
->
charset
(),
res
->
ptr
(),
res
->
length
(),
0
)
:
0.0
;
}
longlong
val_int
()
{
String
*
res
;
res
=
val_str
(
&
str_value
);
return
res
?
strtoll
(
res
->
c_ptr
(),(
char
**
)
0
,
10
)
:
(
longlong
)
0
;
return
res
?
my_strntoll
(
res
->
charset
(),
res
->
ptr
(),
res
->
length
(),(
char
**
)
0
,
10
)
:
(
longlong
)
0
;
}
enum
Item_result
result_type
()
const
{
return
STRING_RESULT
;
}
void
fix_length_and_dec
();
...
...
sql/item_sum.h
View file @
847ea719
...
...
@@ -442,12 +442,12 @@ public:
double
val
()
{
String
*
res
;
res
=
val_str
(
&
str_value
);
return
res
?
atof
(
res
->
c_ptr
()
)
:
0.0
;
return
res
?
my_strntod
(
res
->
charset
(),
res
->
ptr
(),
res
->
length
(),(
char
**
)
0
)
:
0.0
;
}
longlong
val_int
()
{
String
*
res
;
res
=
val_str
(
&
str_value
);
return
res
?
strtoll
(
res
->
c_ptr
(),(
char
**
)
0
,
10
)
:
(
longlong
)
0
;
return
res
?
my_strntoll
(
res
->
charset
(),
res
->
ptr
(),
res
->
length
(),(
char
**
)
0
,
10
)
:
(
longlong
)
0
;
}
enum
Item_result
result_type
()
const
{
return
STRING_RESULT
;
}
void
fix_length_and_dec
();
...
...
strings/ctype-simple.c
View file @
847ea719
...
...
@@ -18,6 +18,8 @@
#include "m_string.h"
#include "m_ctype.h"
#include "my_sys.h"
/* defines errno */
#include <errno.h>
#include "stdarg.h"
#include "assert.h"
...
...
@@ -246,8 +248,6 @@ void my_hash_sort_simple(CHARSET_INFO *cs,
}
#define MY_ERRNO(y)
long
my_strntol_8bit
(
CHARSET_INFO
*
cs
,
const
char
*
nptr
,
uint
l
,
char
**
endptr
,
int
base
)
{
...
...
@@ -349,14 +349,14 @@ long my_strntol_8bit(CHARSET_INFO *cs,
if
(
overflow
)
{
MY_ERRNO
(
ERANGE
);
my_errno
=
(
ERANGE
);
return
negative
?
LONG_MIN
:
LONG_MAX
;
}
return
(
negative
?
-
((
long
)
i
)
:
(
long
)
i
);
noconv:
MY_ERRNO
(
EDOM
);
my_errno
=
(
EDOM
);
if
(
endptr
!=
NULL
)
*
endptr
=
(
char
*
)
nptr
;
return
0L
;
...
...
@@ -455,14 +455,14 @@ ulong my_strntoul_8bit(CHARSET_INFO *cs,
if
(
overflow
)
{
MY_ERRNO
(
ERANGE
);
my_errno
=
(
ERANGE
);
return
((
ulong
)
~
0L
);
}
return
(
negative
?
-
((
long
)
i
)
:
(
long
)
i
);
noconv:
MY_ERRNO
(
EDOM
);
my_errno
=
(
EDOM
);
if
(
endptr
!=
NULL
)
*
endptr
=
(
char
*
)
nptr
;
return
0L
;
...
...
@@ -570,14 +570,14 @@ longlong my_strntoll_8bit(CHARSET_INFO *cs __attribute__((unused)),
if
(
overflow
)
{
MY_ERRNO
(
ERANGE
);
my_errno
=
(
ERANGE
);
return
negative
?
LONGLONG_MIN
:
LONGLONG_MAX
;
}
return
(
negative
?
-
((
longlong
)
i
)
:
(
longlong
)
i
);
noconv:
MY_ERRNO
(
EDOM
);
my_errno
=
(
EDOM
);
if
(
endptr
!=
NULL
)
*
endptr
=
(
char
*
)
nptr
;
return
0L
;
...
...
@@ -677,14 +677,14 @@ ulonglong my_strntoull_8bit(CHARSET_INFO *cs,
if
(
overflow
)
{
MY_ERRNO
(
ERANGE
);
my_errno
=
(
ERANGE
);
return
(
~
(
ulonglong
)
0
);
}
return
(
negative
?
-
((
longlong
)
i
)
:
(
longlong
)
i
);
noconv:
MY_ERRNO
(
EDOM
);
my_errno
=
(
EDOM
);
if
(
endptr
!=
NULL
)
*
endptr
=
(
char
*
)
nptr
;
return
0L
;
...
...
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