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
ecbf43a3
Commit
ecbf43a3
authored
Mar 22, 2007
by
holyfoot/hf@hfmain.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt
into mysql.com:/home/hf/work/mrg/mysql-5.1-opt
parents
d24fb403
03ae298e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
mysql-test/r/func_in.result
mysql-test/r/func_in.result
+5
-0
mysql-test/t/func_in.test
mysql-test/t/func_in.test
+11
-0
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+2
-1
No files found.
mysql-test/r/func_in.result
View file @
ecbf43a3
...
...
@@ -477,6 +477,11 @@ a
Warnings:
Warning 1292 Incorrect date value: '19772-07-29' for column 'a' at row 1
DROP TABLE t1,t2,t3,t4;
CREATE TABLE t1 (id int not null);
INSERT INTO t1 VALUES (1),(2);
SELECT id FROM t1 WHERE id IN(4564, (SELECT IF(1=0,1,1/0)) );
id
DROP TABLE t1;
End of 5.0 tests
create table t1(f1 char(1));
insert into t1 values ('a'),('b'),('1');
...
...
mysql-test/t/func_in.test
View file @
ecbf43a3
...
...
@@ -361,6 +361,17 @@ SELECT * FROM t4 WHERE a IN ('1972-02-06','19772-07-29');
DROP
TABLE
t1
,
t2
,
t3
,
t4
;
#
# BUG#27362: IN with a decimal expression that may return NULL
#
CREATE
TABLE
t1
(
id
int
not
null
);
INSERT
INTO
t1
VALUES
(
1
),(
2
);
SELECT
id
FROM
t1
WHERE
id
IN
(
4564
,
(
SELECT
IF
(
1
=
0
,
1
,
1
/
0
))
);
DROP
TABLE
t1
;
--
echo
End
of
5.0
tests
...
...
sql/item_cmpfunc.cc
View file @
ecbf43a3
...
...
@@ -2458,7 +2458,8 @@ void in_decimal::set(uint pos, Item *item)
dec
->
len
=
DECIMAL_BUFF_LENGTH
;
dec
->
fix_buffer_pointer
();
my_decimal
*
res
=
item
->
val_decimal
(
dec
);
if
(
res
!=
dec
)
/* if item->val_decimal() is evaluated to NULL then res == 0 */
if
(
!
item
->
null_value
&&
res
!=
dec
)
my_decimal2decimal
(
res
,
dec
);
}
...
...
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