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
338259ad
Commit
338259ad
authored
Jul 12, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/psergey/mysql-5.0-bug11821-merge
parents
9d9ef52d
6c9d93eb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
2 deletions
+20
-2
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+6
-0
mysql-test/t/subselect.test
mysql-test/t/subselect.test
+8
-0
sql/item.cc
sql/item.cc
+6
-2
No files found.
mysql-test/r/subselect.result
View file @
338259ad
...
...
@@ -2837,3 +2837,9 @@ WHERE select_id = 0 OR select_id = 1);
values_id
1
DROP TABLE t1, t2;
create table t1 (fld enum('0','1'));
insert into t1 values ('1');
select * from (select max(fld) from t1) as foo;
max(fld)
1
drop table t1;
mysql-test/t/subselect.test
View file @
338259ad
...
...
@@ -1859,3 +1859,11 @@ WHERE values_id IN (SELECT values_id FROM t2
WHERE
select_id
=
0
OR
select_id
=
1
);
DROP
TABLE
t1
,
t2
;
# BUG#11821 : Select from subselect using aggregate function on an enum
# segfaults:
create
table
t1
(
fld
enum
(
'0'
,
'1'
));
insert
into
t1
values
(
'1'
);
select
*
from
(
select
max
(
fld
)
from
t1
)
as
foo
;
drop
table
t1
;
sql/item.cc
View file @
338259ad
...
...
@@ -5421,9 +5421,13 @@ void Item_type_holder::get_full_info(Item *item)
if
(
fld_type
==
MYSQL_TYPE_ENUM
||
fld_type
==
MYSQL_TYPE_SET
)
{
if
(
item
->
type
()
==
Item
::
SUM_FUNC_ITEM
&&
(((
Item_sum
*
)
item
)
->
sum_func
()
==
Item_sum
::
MAX_FUNC
||
((
Item_sum
*
)
item
)
->
sum_func
()
==
Item_sum
::
MIN_FUNC
))
item
=
((
Item_sum
*
)
item
)
->
args
[
0
];
/*
We can have enum/set type after merging only if we have one enum
/
set
field and number of NULL fields
We can have enum/set type after merging only if we have one enum
|
set
field
(or MIN|MAX(enum|set field))
and number of NULL fields
*/
DBUG_ASSERT
((
enum_set_typelib
&&
get_real_type
(
item
)
==
MYSQL_TYPE_NULL
)
||
...
...
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