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
632dff01
Commit
632dff01
authored
Dec 09, 2002
by
bar@bar.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More use of new str->num functions
parent
43786fee
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
18 deletions
+6
-18
sql/field.cc
sql/field.cc
+6
-18
No files found.
sql/field.cc
View file @
632dff01
...
...
@@ -3788,12 +3788,8 @@ int Field_string::store(longlong nr)
double
Field_string
::
val_real
(
void
)
{
double
value
;
char
save
=
ptr
[
field_length
];
// Ok to patch record
ptr
[
field_length
]
=
0
;
value
=
atof
(
ptr
);
ptr
[
field_length
]
=
save
;
return
value
;
CHARSET_INFO
*
cs
=
charset
();
return
my_strntod
(
cs
,
ptr
,
field_length
,(
char
**
)
0
);
}
...
...
@@ -3989,13 +3985,9 @@ int Field_varstring::store(longlong nr)
double
Field_varstring
::
val_real
(
void
)
{
double
value
;
uint
length
=
uint2korr
(
ptr
)
+
2
;
char
save
=
ptr
[
length
];
// Ok to patch record
ptr
[
length
]
=
0
;
value
=
atof
(
ptr
+
2
);
ptr
[
length
]
=
save
;
return
value
;
CHARSET_INFO
*
cs
=
charset
();
return
my_strntod
(
cs
,
ptr
+
2
,
length
,(
char
**
)
0
);
}
...
...
@@ -4326,12 +4318,8 @@ double Field_blob::val_real(void)
if
(
!
blob
)
return
0.0
;
uint32
length
=
get_length
(
ptr
);
char
save
=
blob
[
length
];
// Ok to patch blob in NISAM
blob
[
length
]
=
0
;
double
nr
=
atof
(
blob
);
blob
[
length
]
=
save
;
return
nr
;
CHARSET_INFO
*
cs
=
charset
();
return
my_strntod
(
cs
,
blob
,
length
,(
char
**
)
0
);
}
...
...
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