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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d87c53cb
Commit
d87c53cb
authored
Aug 15, 2018
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-16984 Assertion `dec' failed in Dec_ptr::cmp
Fixing the bug (in the code from MDEV-16910)
parent
d6d63f48
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
1 deletion
+26
-1
mysql-test/main/type_decimal.result
mysql-test/main/type_decimal.result
+14
-0
mysql-test/main/type_decimal.test
mysql-test/main/type_decimal.test
+11
-0
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+1
-1
No files found.
mysql-test/main/type_decimal.result
View file @
d87c53cb
...
...
@@ -1204,5 +1204,19 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where <cache>(octet_length(10.0)) + `test`.`t1`.`a` <=> <cache>(octet_length(10.00)) + `test`.`t1`.`a`
DROP TABLE t1;
#
# MDEV-16984 Assertion `dec' failed in Dec_ptr::cmp
#
SET sql_mode='';
CREATE TABLE t1 (dc decimal(10));
INSERT INTO t1 VALUES (0000000),(NULL);
SELECT 1 FROM t1 GROUP BY 'm' <=> dc;
1
1
1
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: 'm'
DROP TABLE t1;
SET sql_mode=DEFAULT;
#
# End of 10.4 tests
#
mysql-test/main/type_decimal.test
View file @
d87c53cb
...
...
@@ -744,6 +744,17 @@ EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(10.0)+a<=>LENG
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-16984 Assertion `dec' failed in Dec_ptr::cmp
--
echo
#
SET
sql_mode
=
''
;
CREATE
TABLE
t1
(
dc
decimal
(
10
));
INSERT
INTO
t1
VALUES
(
0000000
),(
NULL
);
SELECT
1
FROM
t1
GROUP
BY
'm'
<=>
dc
;
DROP
TABLE
t1
;
SET
sql_mode
=
DEFAULT
;
--
echo
#
--
echo
# End of 10.4 tests
--
echo
#
sql/item_cmpfunc.cc
View file @
d87c53cb
...
...
@@ -823,7 +823,7 @@ int Arg_comparator::compare_e_real()
int
Arg_comparator
::
compare_e_decimal
()
{
VDec
val1
(
*
a
),
val2
(
*
b
);
if
(
val1
.
is_null
()
||
val
1
.
is_null
())
if
(
val1
.
is_null
()
||
val
2
.
is_null
())
return
MY_TEST
(
val1
.
is_null
()
&&
val2
.
is_null
());
return
MY_TEST
(
val1
.
cmp
(
val2
)
==
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