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
c9d97272
Commit
c9d97272
authored
Sep 03, 2004
by
ram@gw.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A fix (Bug #5291: float -> string, truncation, sometimes without warning).
parent
15eb33ab
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
mysql-test/r/type_float.result
mysql-test/r/type_float.result
+2
-0
sql/field.cc
sql/field.cc
+1
-1
No files found.
mysql-test/r/type_float.result
View file @
c9d97272
...
...
@@ -137,6 +137,8 @@ t1 CREATE TABLE `t1` (
drop table t1;
create table t1 (c20 char);
insert into t1 values (5000.0);
Warnings:
Warning 1265 Data truncated for column 'c20' at row 1
drop table t1;
create table t1 (f float(54));
ERROR 42000: Incorrect column specifier for column 'f'
...
...
sql/field.cc
View file @
c9d97272
...
...
@@ -4297,7 +4297,7 @@ if (field_length < 32 && fabs(nr) < log_10[field_length]-1)
like inserting 500.0 in char(1)
*/
DBUG_ASSERT
(
field_length
<
5
||
length
<=
field_length
+
1
);
return
store
((
const
char
*
)
buff
,
min
(
length
,
field_length
)
,
charset
());
return
store
((
const
char
*
)
buff
,
length
,
charset
());
}
...
...
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