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
6c37da5a
Commit
6c37da5a
authored
Dec 15, 2009
by
Georgi Kodinov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug#49489: Uninitialized cache led to a wrong result.
Merge the fix from 5.1-bugteam to 5.1-main
parent
34e5fc9c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
1 deletion
+20
-1
mysql-test/r/select.result
mysql-test/r/select.result
+10
-0
mysql-test/t/select.test
mysql-test/t/select.test
+9
-0
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+1
-1
No files found.
mysql-test/r/select.result
View file @
6c37da5a
...
...
@@ -4609,4 +4609,14 @@ HAVING v <= 't'
ORDER BY pk;
v
DROP TABLE t1;
#
# Bug#49489 Uninitialized cache led to a wrong result.
#
CREATE TABLE t1(c1 DOUBLE(5,4));
INSERT INTO t1 VALUES (9.1234);
SELECT * FROM t1 WHERE c1 < 9.12345;
c1
9.1234
DROP TABLE t1;
# End of test for bug#49489.
End of 5.1 tests
mysql-test/t/select.test
View file @
6c37da5a
...
...
@@ -3964,4 +3964,13 @@ ORDER BY pk;
DROP
TABLE
t1
;
--
echo
#
--
echo
# Bug#49489 Uninitialized cache led to a wrong result.
--
echo
#
CREATE
TABLE
t1
(
c1
DOUBLE
(
5
,
4
));
INSERT
INTO
t1
VALUES
(
9.1234
);
SELECT
*
FROM
t1
WHERE
c1
<
9.12345
;
DROP
TABLE
t1
;
--
echo
# End of test for bug#49489.
--
echo
End
of
5.1
tests
sql/item_cmpfunc.cc
View file @
6c37da5a
...
...
@@ -1031,7 +1031,7 @@ Item** Arg_comparator::cache_converted_constant(THD *thd, Item **value,
(
*
value
)
->
const_item
()
&&
type
!=
(
*
value
)
->
result_type
())
{
Item_cache
*
cache
=
Item_cache
::
get_cache
(
*
value
,
type
);
cache
->
s
tore
(
*
value
);
cache
->
s
etup
(
*
value
);
*
cache_item
=
cache
;
return
cache_item
;
}
...
...
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