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
3c108b2a
Commit
3c108b2a
authored
Nov 25, 2004
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init values to avoid junk returning in case of null value asking without assigning value (BUG#6806)
parent
2ca5a0f2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
3 deletions
+16
-3
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+5
-0
mysql-test/t/subselect.test
mysql-test/t/subselect.test
+8
-0
sql/item.h
sql/item.h
+3
-3
No files found.
mysql-test/r/subselect.result
View file @
3c108b2a
...
...
@@ -2005,3 +2005,8 @@ explain select a from t1 where c=2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where
drop table t1;
create table t1 (s1 int,s2 int);
insert into t1 values (20,15);
select * from t1 where (('a',null) <=> (select 'a',s2 from t1 where s1 = 0));
s1 s2
drop table t1;
mysql-test/t/subselect.test
View file @
3c108b2a
...
...
@@ -1301,3 +1301,11 @@ explain select a from t1 where c=2;
do
@
a
:=
(
select
sum
(
a
)
from
t1
where
b
>
@
b
);
explain
select
a
from
t1
where
c
=
2
;
drop
table
t1
;
#
# Equal operation under row and empty subquery
#
create
table
t1
(
s1
int
,
s2
int
);
insert
into
t1
values
(
20
,
15
);
select
*
from
t1
where
((
'a'
,
null
)
<=>
(
select
'a'
,
s2
from
t1
where
s1
=
0
));
drop
table
t1
;
sql/item.h
View file @
3c108b2a
...
...
@@ -1127,7 +1127,7 @@ class Item_cache_int: public Item_cache
{
longlong
value
;
public:
Item_cache_int
()
:
Item_cache
()
{}
Item_cache_int
()
:
Item_cache
()
,
value
(
0
)
{}
void
store
(
Item
*
item
);
double
val
()
{
DBUG_ASSERT
(
fixed
==
1
);
return
(
double
)
value
;
}
...
...
@@ -1145,7 +1145,7 @@ class Item_cache_real: public Item_cache
{
double
value
;
public:
Item_cache_real
()
:
Item_cache
()
{}
Item_cache_real
()
:
Item_cache
()
,
value
(
0
)
{}
void
store
(
Item
*
item
);
double
val
()
{
DBUG_ASSERT
(
fixed
==
1
);
return
value
;
}
...
...
@@ -1167,7 +1167,7 @@ class Item_cache_str: public Item_cache
char
buffer
[
80
];
String
*
value
,
value_buff
;
public:
Item_cache_str
()
:
Item_cache
()
{
}
Item_cache_str
()
:
Item_cache
()
,
value
(
0
)
{
}
void
store
(
Item
*
item
);
double
val
();
...
...
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