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
40bd22ef
Commit
40bd22ef
authored
Oct 11, 2005
by
hf@deer.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug #13667 (Inconsistency for decimal(m,d) specification.
parent
bb179f23
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
mysql-test/r/type_newdecimal.result
mysql-test/r/type_newdecimal.result
+2
-0
mysql-test/t/type_newdecimal.test
mysql-test/t/type_newdecimal.test
+6
-0
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
No files found.
mysql-test/r/type_newdecimal.result
View file @
40bd22ef
...
...
@@ -1019,3 +1019,5 @@ drop procedure wg2;
select cast(@non_existing_user_var/2 as DECIMAL);
cast(@non_existing_user_var/2 as DECIMAL)
NULL
create table t (d decimal(0,10));
ERROR 42000: For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column 'd').
mysql-test/t/type_newdecimal.test
View file @
40bd22ef
...
...
@@ -1044,3 +1044,9 @@ drop procedure wg2;
#
select
cast
(
@
non_existing_user_var
/
2
as
DECIMAL
);
#
# Bug #13667 (Inconsistency for decimal(m,d) specification
#
--
error
1427
create
table
t
(
d
decimal
(
0
,
10
));
sql/sql_parse.cc
View file @
40bd22ef
...
...
@@ -5748,7 +5748,7 @@ new_create_field(THD *thd, char *field_name, enum_field_types type,
case
FIELD_TYPE_NULL
:
break
;
case
FIELD_TYPE_NEWDECIMAL
:
if
(
!
length
)
if
(
!
length
&&
!
new_field
->
decimals
)
new_field
->
length
=
10
;
if
(
new_field
->
length
>
DECIMAL_MAX_PRECISION
)
{
...
...
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