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
ec8d6d05
Commit
ec8d6d05
authored
Aug 28, 2003
by
bell@laptop.sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enum renamed (asked for compilation under windows)
parent
42171225
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
20 deletions
+20
-20
sql/item_subselect.cc
sql/item_subselect.cc
+17
-17
sql/item_subselect.h
sql/item_subselect.h
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+2
-2
No files found.
sql/item_subselect.cc
View file @
ec8d6d05
...
...
@@ -72,7 +72,7 @@ Item_subselect::trans_res
Item_subselect
::
select_transformer
(
JOIN
*
join
)
{
DBUG_ENTER
(
"Item_subselect::select_transformer"
);
DBUG_RETURN
(
OK
);
DBUG_RETURN
(
RES_
OK
);
}
...
...
@@ -214,14 +214,14 @@ Item_singlerow_subselect::select_transformer(JOIN *join)
cond
=
join
->
having
;
else
if
(
!
(
cond
=
new
Item_cond_and
(
join
->
conds
,
join
->
having
)))
return
ERROR
;
return
RES_
ERROR
;
if
(
!
(
substitution
=
new
Item_func_if
(
cond
,
substitution
,
new
Item_null
())))
return
ERROR
;
return
RES_
ERROR
;
}
return
REDUCE
;
return
RE
S_RE
DUCE
;
}
return
OK
;
return
RES_
OK
;
}
void
Item_singlerow_subselect
::
store
(
uint
i
,
Item
*
item
)
...
...
@@ -508,7 +508,7 @@ Item_in_subselect::single_value_transformer(JOIN *join,
if
(
!
optimizer
||
optimizer
->
fix_left
(
thd
,
up
->
get_table_list
(),
0
))
{
thd
->
lex
.
current_select
=
current
;
DBUG_RETURN
(
ERROR
);
DBUG_RETURN
(
RES_
ERROR
);
}
thd
->
lex
.
current_select
=
current
;
...
...
@@ -528,7 +528,7 @@ Item_in_subselect::single_value_transformer(JOIN *join,
if
(
select_lex
->
item_list
.
elements
>
1
)
{
my_error
(
ER_CARDINALITY_COL
,
MYF
(
0
),
1
);
DBUG_RETURN
(
ERROR
);
DBUG_RETURN
(
RES_
ERROR
);
}
item
=
(
Item
*
)
select_lex
->
item_list
.
head
();
...
...
@@ -546,7 +546,7 @@ Item_in_subselect::single_value_transformer(JOIN *join,
if
(
join
->
having
->
fix_fields
(
thd
,
join
->
tables_list
,
&
join
->
having
))
{
select_lex
->
having_fix_field
=
0
;
DBUG_RETURN
(
ERROR
);
DBUG_RETURN
(
RES_
ERROR
);
}
select_lex
->
having_fix_field
=
0
;
}
...
...
@@ -570,7 +570,7 @@ Item_in_subselect::single_value_transformer(JOIN *join,
if
(
join
->
having
->
fix_fields
(
thd
,
join
->
tables_list
,
&
join
->
having
))
{
select_lex
->
having_fix_field
=
0
;
DBUG_RETURN
(
ERROR
);
DBUG_RETURN
(
RES_
ERROR
);
}
select_lex
->
having_fix_field
=
0
;
item
=
new
Item_cond_or
(
item
,
...
...
@@ -578,7 +578,7 @@ Item_in_subselect::single_value_transformer(JOIN *join,
}
join
->
conds
=
and_items
(
join
->
conds
,
item
);
if
(
join
->
conds
->
fix_fields
(
thd
,
join
->
tables_list
,
&
join
->
conds
))
DBUG_RETURN
(
ERROR
);
DBUG_RETURN
(
RES_
ERROR
);
}
else
{
...
...
@@ -592,7 +592,7 @@ Item_in_subselect::single_value_transformer(JOIN *join,
if
(
join
->
having
->
fix_fields
(
thd
,
join
->
tables_list
,
&
join
->
having
))
{
select_lex
->
having_fix_field
=
0
;
DBUG_RETURN
(
ERROR
);
DBUG_RETURN
(
RES_
ERROR
);
}
select_lex
->
having_fix_field
=
0
;
}
...
...
@@ -610,11 +610,11 @@ Item_in_subselect::single_value_transformer(JOIN *join,
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_NOTE
,
ER_SELECT_REDUCED
,
warn_buff
);
}
DBUG_RETURN
(
REDUCE
);
DBUG_RETURN
(
RE
S_RE
DUCE
);
}
}
}
DBUG_RETURN
(
OK
);
DBUG_RETURN
(
RES_
OK
);
}
Item_subselect
::
trans_res
...
...
@@ -640,7 +640,7 @@ Item_in_subselect::row_value_transformer(JOIN *join,
if
(
!
optimizer
||
optimizer
->
fix_left
(
thd
,
up
->
get_table_list
(),
0
))
{
thd
->
lex
.
current_select
=
current
;
DBUG_RETURN
(
ERROR
);
DBUG_RETURN
(
RES_
ERROR
);
}
thd
->
lex
.
current_select
=
current
;
...
...
@@ -679,7 +679,7 @@ Item_in_subselect::row_value_transformer(JOIN *join,
if
(
join
->
having
->
fix_fields
(
thd
,
join
->
tables_list
,
&
join
->
having
))
{
select_lex
->
having_fix_field
=
0
;
DBUG_RETURN
(
ERROR
);
DBUG_RETURN
(
RES_
ERROR
);
}
select_lex
->
having_fix_field
=
0
;
}
...
...
@@ -687,9 +687,9 @@ Item_in_subselect::row_value_transformer(JOIN *join,
{
join
->
conds
=
and_items
(
join
->
conds
,
item
);
if
(
join
->
conds
->
fix_fields
(
thd
,
join
->
tables_list
,
&
join
->
having
))
DBUG_RETURN
(
ERROR
);
DBUG_RETURN
(
RES_
ERROR
);
}
DBUG_RETURN
(
OK
);
DBUG_RETURN
(
RES_
OK
);
}
Item_subselect
::
trans_res
...
...
sql/item_subselect.h
View file @
ec8d6d05
...
...
@@ -51,7 +51,7 @@ class Item_subselect :public Item_result_field
/* changed engine indicator */
bool
engine_changed
;
enum
trans_res
{
OK
,
REDUCE
,
ERROR
};
enum
trans_res
{
RES_OK
,
RES_REDUCE
,
RES_
ERROR
};
enum
subs_type
{
UNKNOWN_SUBS
,
SINGLEROW_SUBS
,
EXISTS_SUBS
,
IN_SUBS
,
ALLANY_SUBS
};
...
...
sql/sql_select.cc
View file @
ec8d6d05
...
...
@@ -324,8 +324,8 @@ JOIN::prepare(Item ***rref_pointer_array,
{
Item_subselect
::
trans_res
res
;
if
((
res
=
subselect
->
select_transformer
(
this
))
!=
Item_subselect
::
OK
)
DBUG_RETURN
((
res
==
Item_subselect
::
ERROR
));
Item_subselect
::
RES_
OK
)
DBUG_RETURN
((
res
==
Item_subselect
::
RES_
ERROR
));
}
}
...
...
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