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
7cd0e434
Commit
7cd0e434
authored
Apr 06, 2005
by
hf@deer.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stupid error message for 'insert "aaa"' into decimal column fixed
parent
328b453c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
mysql-test/r/row.result
mysql-test/r/row.result
+1
-1
sql/item.cc
sql/item.cc
+10
-6
No files found.
mysql-test/r/row.result
View file @
7cd0e434
...
...
@@ -15,7 +15,7 @@ select row('a',1.5,3) IN (row(1,2,3), row('a',1.5,3), row('a','a','a'));
row('a',1.5,3) IN (row(1,2,3), row('a',1.5,3), row('a','a','a'))
1
Warnings:
Error 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: 'a'
select row('a',0,3) IN (row(3,2,3), row('a','0','3'), row(1,3,3));
row('a',0,3) IN (row(3,2,3), row('a','0','3'), row(1,3,3))
1
...
...
sql/item.cc
View file @
7cd0e434
...
...
@@ -260,8 +260,15 @@ my_decimal *Item::val_decimal_from_string(my_decimal *decimal_value)
return
0
;
// NULL or EOM
end_ptr
=
(
char
*
)
res
->
ptr
()
+
res
->
length
();
str2my_decimal
(
E_DEC_FATAL_ERROR
,
res
->
ptr
(),
res
->
length
(),
res
->
charset
(),
decimal_value
);
if
(
str2my_decimal
(
E_DEC_FATAL_ERROR
&
~
E_DEC_BAD_NUM
,
res
->
ptr
(),
res
->
length
(),
res
->
charset
(),
decimal_value
)
&
E_DEC_BAD_NUM
)
{
push_warning_printf
(
current_thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_TRUNCATED_WRONG_VALUE
,
ER
(
ER_TRUNCATED_WRONG_VALUE
),
"DECIMAL"
,
str_value
.
c_ptr
());
}
return
decimal_value
;
}
...
...
@@ -1457,10 +1464,7 @@ void Item_string::print(String *str)
my_decimal
*
Item_string
::
val_decimal
(
my_decimal
*
decimal_value
)
{
/* following assert is redundant, because fixed=1 assigned in constructor */
DBUG_ASSERT
(
fixed
==
1
);
string2my_decimal
(
E_DEC_FATAL_ERROR
,
&
str_value
,
decimal_value
);
return
(
decimal_value
);
return
val_decimal_from_string
(
decimal_value
);
}
...
...
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