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
187ee471
Commit
187ee471
authored
May 12, 2005
by
jani@a193-229-222-105.elisa-laajakaista.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug 10465.
parent
e4d19648
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
1 deletion
+25
-1
mysql-test/r/type_newdecimal.result
mysql-test/r/type_newdecimal.result
+9
-0
mysql-test/t/type_newdecimal.test
mysql-test/t/type_newdecimal.test
+10
-0
sql/field.cc
sql/field.cc
+6
-1
No files found.
mysql-test/r/type_newdecimal.result
View file @
187ee471
...
@@ -876,3 +876,12 @@ SELECT * FROM t1;
...
@@ -876,3 +876,12 @@ SELECT * FROM t1;
f1 f2
f1 f2
9999999999999999999999999999999999.00000000000000000000 0.00
9999999999999999999999999999999999.00000000000000000000 0.00
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (GRADE DECIMAL(4) NOT NULL, PRIMARY KEY (GRADE)) ENGINE=INNODB;
INSERT INTO t1 (GRADE) VALUES (151),(252),(343);
SELECT GRADE FROM t1 WHERE GRADE > 160 AND GRADE < 300;
GRADE
252
SELECT GRADE FROM t1 WHERE GRADE= 151;
GRADE
151
DROP TABLE t1;
mysql-test/t/type_newdecimal.test
View file @
187ee471
...
@@ -906,3 +906,13 @@ CREATE TABLE t1 (f1 DECIMAL (64,20), f2 DECIMAL(2,2));
...
@@ -906,3 +906,13 @@ CREATE TABLE t1 (f1 DECIMAL (64,20), f2 DECIMAL(2,2));
INSERT
INTO
t1
VALUES
(
9999999999999999999999999999999999
,
0
);
INSERT
INTO
t1
VALUES
(
9999999999999999999999999999999999
,
0
);
SELECT
*
FROM
t1
;
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
#
# Bug #10465
#
CREATE
TABLE
t1
(
GRADE
DECIMAL
(
4
)
NOT
NULL
,
PRIMARY
KEY
(
GRADE
))
ENGINE
=
INNODB
;
INSERT
INTO
t1
(
GRADE
)
VALUES
(
151
),(
252
),(
343
);
SELECT
GRADE
FROM
t1
WHERE
GRADE
>
160
AND
GRADE
<
300
;
SELECT
GRADE
FROM
t1
WHERE
GRADE
=
151
;
DROP
TABLE
t1
;
sql/field.cc
View file @
187ee471
...
@@ -8060,7 +8060,12 @@ void create_field::create_length_to_internal_length(void)
...
@@ -8060,7 +8060,12 @@ void create_field::create_length_to_internal_length(void)
}
}
break
;
break
;
case
MYSQL_TYPE_NEWDECIMAL
:
case
MYSQL_TYPE_NEWDECIMAL
:
key_length
=
pack_length
=
my_decimal_get_binary_size
(
length
,
decimals
);
key_length
=
pack_length
=
my_decimal_get_binary_size
(
my_decimal_length_to_precision
(
length
,
decimals
,
flags
&
UNSIGNED_FLAG
),
decimals
);
break
;
break
;
default:
default:
key_length
=
pack_length
=
calc_pack_length
(
sql_type
,
length
);
key_length
=
pack_length
=
calc_pack_length
(
sql_type
,
length
);
...
...
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