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
30913419
Commit
30913419
authored
Aug 20, 2003
by
bell@laptop.sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
after merge changing
uninitialized value fixed
parent
dd9cbce4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
10 deletions
+17
-10
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+6
-4
sql/item_subselect.cc
sql/item_subselect.cc
+1
-1
sql/mysql_priv.h
sql/mysql_priv.h
+1
-1
sql/sql_parse.cc
sql/sql_parse.cc
+2
-2
sql/sql_union.cc
sql/sql_union.cc
+5
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+2
-2
No files found.
sql/item_cmpfunc.cc
View file @
30913419
...
...
@@ -385,7 +385,7 @@ bool Item_in_optimizer::fix_left(THD *thd,
cache
->
store
(
args
[
0
]);
if
(
cache
->
cols
()
==
1
)
{
if
(
args
[
0
]
->
used_tables
(
))
if
(
(
used_tables_cache
=
args
[
0
]
->
used_tables
()
))
cache
->
set_used_tables
(
OUTER_REF_TABLE_BIT
);
else
cache
->
set_used_tables
(
0
);
...
...
@@ -400,7 +400,11 @@ bool Item_in_optimizer::fix_left(THD *thd,
else
((
Item_cache
*
)
cache
->
el
(
i
))
->
set_used_tables
(
0
);
}
used_tables_cache
=
args
[
0
]
->
used_tables
();
}
not_null_tables_cache
=
args
[
0
]
->
not_null_tables
();
with_sum_func
=
args
[
0
]
->
with_sum_func
;
const_item_cache
=
args
[
0
]
->
const_item
();
return
0
;
}
...
...
@@ -414,9 +418,6 @@ bool Item_in_optimizer::fix_fields(THD *thd, struct st_table_list *tables,
if
(
args
[
0
]
->
maybe_null
)
maybe_null
=
1
;
with_sum_func
=
args
[
0
]
->
with_sum_func
;
used_tables_cache
=
args
[
0
]
->
used_tables
();
const_item_cache
=
args
[
0
]
->
const_item
();
if
(
!
args
[
1
]
->
fixed
&&
args
[
1
]
->
fix_fields
(
thd
,
tables
,
args
))
return
1
;
Item_in_subselect
*
sub
=
(
Item_in_subselect
*
)
args
[
1
];
...
...
@@ -429,6 +430,7 @@ bool Item_in_optimizer::fix_fields(THD *thd, struct st_table_list *tables,
maybe_null
=
1
;
with_sum_func
=
with_sum_func
||
args
[
1
]
->
with_sum_func
;
used_tables_cache
|=
args
[
1
]
->
used_tables
();
not_null_tables_cache
|=
args
[
1
]
->
not_null_tables
();
const_item_cache
&=
args
[
1
]
->
const_item
();
return
0
;
}
...
...
sql/item_subselect.cc
View file @
30913419
...
...
@@ -148,7 +148,7 @@ void Item_subselect::fix_length_and_dec()
inline
table_map
Item_subselect
::
used_tables
()
const
{
return
(
table_map
)
(
engine
->
dependent
()
?
1L
:
(
engine
->
uncacheable
()
?
OUTER_REF
_TABLE_BIT
:
0L
));
(
engine
->
uncacheable
()
?
RAND
_TABLE_BIT
:
0L
));
}
Item_singlerow_subselect
::
Item_singlerow_subselect
(
THD
*
thd
,
...
...
sql/mysql_priv.h
View file @
30913419
...
...
@@ -983,7 +983,7 @@ inline void setup_table_map(TABLE *table, TABLE_LIST *table_list, uint tablenr)
{
table
->
used_fields
=
0
;
table
->
const_table
=
0
;
table
->
outer_join
=
table
->
null_row
=
0
;
table
->
null_row
=
0
;
table
->
status
=
STATUS_NO_RECORD
;
table
->
keys_in_use_for_query
=
table
->
keys_in_use
;
table
->
maybe_null
=
test
(
table
->
outer_join
=
table_list
->
outer_join
);
...
...
sql/sql_parse.cc
View file @
30913419
...
...
@@ -3614,7 +3614,7 @@ mysql_new_select(LEX *lex, bool move_down)
if
(
move_down
)
{
/* first select_lex of subselect or derived table */
SELECT_LEX_UNIT
*
unit
=
new
SELECT_LEX_UNIT
();
SELECT_LEX_UNIT
*
unit
=
new
(
&
lex
->
thd
->
mem_root
)
SELECT_LEX_UNIT
();
if
(
!
unit
)
return
1
;
unit
->
init_query
();
...
...
@@ -3638,7 +3638,7 @@ mysql_new_select(LEX *lex, bool move_down)
as far as we included SELECT_LEX for UNION unit should have
fake SELECT_LEX for UNION processing
*/
fake
=
unit
->
fake_select_lex
=
new
SELECT_LEX
();
fake
=
unit
->
fake_select_lex
=
new
(
&
lex
->
thd
->
mem_root
)
SELECT_LEX
();
fake
->
include_standalone
(
unit
,
(
SELECT_LEX_NODE
**
)
&
unit
->
fake_select_lex
);
fake
->
select_number
=
INT_MAX
;
...
...
sql/sql_union.cc
View file @
30913419
...
...
@@ -349,6 +349,11 @@ int st_select_lex_unit::exec()
mysql_select automatic allocation)
*/
fake_select_lex
->
join
=
new
JOIN
(
thd
,
item_list
,
thd
->
options
,
result
);
/*
Fake st_select_lex should have item list for correctref_array
allocation.
*/
fake_select_lex
->
item_list
=
item_list
;
}
else
{
...
...
sql/sql_yacc.yy
View file @
30913419
...
...
@@ -965,7 +965,7 @@ create_select:
lex->sql_command= SQLCOM_INSERT_SELECT;
else if (lex->sql_command == SQLCOM_REPLACE)
lex->sql_command= SQLCOM_REPLACE_SELECT;
lex->current_select->
select_lex()->
table_list.save_and_clear(&lex->save_list);
lex->current_select->table_list.save_and_clear(&lex->save_list);
mysql_init_select(lex);
lex->current_select->parsing_place= SELECT_LEX_NODE::SELECT_LIST;
}
...
...
@@ -974,7 +974,7 @@ create_select:
Select->parsing_place= SELECT_LEX_NODE::NO_MATTER;
}
opt_select_from
{ Lex->current_select->
select_lex()->
table_list.push_front(&Lex->save_list); }
{ Lex->current_select->table_list.push_front(&Lex->save_list); }
;
opt_as:
...
...
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