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
40c0fd1c
Commit
40c0fd1c
authored
Oct 08, 2002
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed 'this' pointer from initialization list of constructors
parent
22653586
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
13 deletions
+27
-13
sql/item_subselect.cc
sql/item_subselect.cc
+18
-11
sql/item_subselect.h
sql/item_subselect.h
+9
-2
No files found.
sql/item_subselect.cc
View file @
40c0fd1c
...
...
@@ -32,11 +32,22 @@ SUBSELECT TODO:
#include "mysql_priv.h"
#include "sql_select.h"
Item_subselect
::
Item_subselect
(
THD
*
thd
,
st_select_lex
*
select_lex
,
select_subselect
*
result
)
:
Item_subselect
::
Item_subselect
()
:
Item
(),
engine_owner
(
1
),
value_assigned
(
0
)
{
DBUG_ENTER
(
"Item_subselect::Item_subselect"
);
assign_null
();
/*
item value is NULL if select_subselect not changed this value
(i.e. some rows will be found returned)
*/
null_value
=
1
;
}
void
Item_subselect
::
init
(
THD
*
thd
,
st_select_lex
*
select_lex
,
select_subselect
*
result
)
{
DBUG_ENTER
(
"Item_subselect::init"
);
DBUG_PRINT
(
"subs"
,
(
"select_lex 0x%xl"
,
(
long
)
select_lex
));
if
(
select_lex
->
next_select
())
...
...
@@ -45,12 +56,6 @@ Item_subselect::Item_subselect(THD *thd, st_select_lex *select_lex,
else
engine
=
new
subselect_single_select_engine
(
thd
,
select_lex
,
result
,
this
);
assign_null
();
/*
item value is NULL if select_subselect not changed this value
(i.e. some rows will be found returned)
*/
null_value
=
1
;
DBUG_VOID_RETURN
;
}
...
...
@@ -100,8 +105,9 @@ inline table_map Item_subselect::used_tables() const
Item_singleval_subselect
::
Item_singleval_subselect
(
THD
*
thd
,
st_select_lex
*
select_lex
)
:
Item_subselect
(
thd
,
select_lex
,
new
select_singleval_subselect
(
this
)
)
Item_subselect
()
{
init
(
thd
,
select_lex
,
new
select_singleval_subselect
(
this
));
max_columns
=
1
;
maybe_null
=
1
;
}
...
...
@@ -149,8 +155,9 @@ String *Item_singleval_subselect::val_str (String *str)
Item_exists_subselect
::
Item_exists_subselect
(
THD
*
thd
,
st_select_lex
*
select_lex
)
:
Item_subselect
(
thd
,
select_lex
,
new
select_exists_subselect
(
this
)
)
Item_subselect
()
{
init
(
thd
,
select_lex
,
new
select_exists_subselect
(
this
));
max_columns
=
UINT_MAX
;
null_value
=
0
;
//can't be NULL
maybe_null
=
0
;
//can't be NULL
...
...
sql/item_subselect.h
View file @
40c0fd1c
...
...
@@ -39,8 +39,7 @@ class Item_subselect :public Item
uint
max_columns
;
public:
Item_subselect
(
THD
*
thd
,
st_select_lex
*
select_lex
,
select_subselect
*
result
);
Item_subselect
();
Item_subselect
(
Item_subselect
*
item
)
{
null_value
=
item
->
null_value
;
...
...
@@ -50,6 +49,14 @@ class Item_subselect :public Item
engine_owner
=
0
;
name
=
item
->
name
;
}
/*
We need this method, because some compilers do not allow 'this'
pointer in constructor initialization list, but we need pass pointer
to subselect Item class to select_subselect classes constructor.
*/
void
init
(
THD
*
thd
,
st_select_lex
*
select_lex
,
select_subselect
*
result
);
~
Item_subselect
();
virtual
void
assign_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