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
33e54bb8
Commit
33e54bb8
authored
Apr 07, 2005
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#8877: Post-merge fixes.
parent
903b59c7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
sql/sql_select.cc
sql/sql_select.cc
+9
-6
No files found.
sql/sql_select.cc
View file @
33e54bb8
...
@@ -2231,6 +2231,8 @@ make_join_statistics(JOIN *join, TABLE_LIST *tables, COND *conds,
...
@@ -2231,6 +2231,8 @@ make_join_statistics(JOIN *join, TABLE_LIST *tables, COND *conds,
if
(
s
->
dependent
&
table
->
map
)
if
(
s
->
dependent
&
table
->
map
)
s
->
dependent
|=
table
->
reginfo
.
join_tab
->
dependent
;
s
->
dependent
|=
table
->
reginfo
.
join_tab
->
dependent
;
}
}
if
(
s
->
dependent
)
s
->
table
->
maybe_null
=
1
;
}
}
/* Catch illegal cross references for outer joins */
/* Catch illegal cross references for outer joins */
for
(
i
=
0
,
s
=
stat
;
i
<
table_count
;
i
++
,
s
++
)
for
(
i
=
0
,
s
=
stat
;
i
<
table_count
;
i
++
,
s
++
)
...
@@ -2623,6 +2625,7 @@ merge_key_fields(KEY_FIELD *start,KEY_FIELD *new_fields,KEY_FIELD *end,
...
@@ -2623,6 +2625,7 @@ merge_key_fields(KEY_FIELD *start,KEY_FIELD *new_fields,KEY_FIELD *end,
static
void
static
void
add_key_field
(
KEY_FIELD
**
key_fields
,
uint
and_level
,
Item_func
*
cond
,
add_key_field
(
KEY_FIELD
**
key_fields
,
uint
and_level
,
Item_func
*
cond
,
Field
*
field
,
bool
eq_func
,
Item
**
value
,
uint
num_values
,
table_map
usable_tables
)
table_map
usable_tables
)
{
{
uint
exists_optimize
=
0
;
uint
exists_optimize
=
0
;
...
@@ -2758,7 +2761,7 @@ add_key_field(KEY_FIELD **key_fields,uint and_level, Item_func *cond,
...
@@ -2758,7 +2761,7 @@ add_key_field(KEY_FIELD **key_fields,uint and_level, Item_func *cond,
static
void
static
void
add_key_equal_fields
(
KEY_FIELD
**
key_fields
,
uint
and_level
,
add_key_equal_fields
(
KEY_FIELD
**
key_fields
,
uint
and_level
,
COND
*
cond
,
Item_field
*
field_item
,
Item_func
*
cond
,
Item_field
*
field_item
,
bool
eq_func
,
Item
**
val
,
bool
eq_func
,
Item
**
val
,
uint
num_values
,
table_map
usable_tables
)
uint
num_values
,
table_map
usable_tables
)
{
{
...
@@ -2899,7 +2902,7 @@ add_key_fields(KEY_FIELD **key_fields,uint *and_level,
...
@@ -2899,7 +2902,7 @@ add_key_fields(KEY_FIELD **key_fields,uint *and_level,
*/
*/
while
((
item
=
it
++
))
while
((
item
=
it
++
))
{
{
add_key_field
(
key_fields
,
*
and_level
,
cond
,
item
->
field
,
add_key_field
(
key_fields
,
*
and_level
,
cond
_func
,
item
->
field
,
TRUE
,
&
const_item
,
1
,
usable_tables
);
TRUE
,
&
const_item
,
1
,
usable_tables
);
}
}
}
}
...
@@ -2919,7 +2922,7 @@ add_key_fields(KEY_FIELD **key_fields,uint *and_level,
...
@@ -2919,7 +2922,7 @@ add_key_fields(KEY_FIELD **key_fields,uint *and_level,
{
{
if
(
!
field
->
eq
(
item
->
field
))
if
(
!
field
->
eq
(
item
->
field
))
{
{
add_key_field
(
key_fields
,
*
and_level
,
cond
,
field
,
add_key_field
(
key_fields
,
*
and_level
,
cond
_func
,
field
,
TRUE
,
(
Item
**
)
&
item
,
1
,
usable_tables
);
TRUE
,
(
Item
**
)
&
item
,
1
,
usable_tables
);
}
}
}
}
...
@@ -3139,7 +3142,7 @@ update_ref_and_keys(THD *thd, DYNAMIC_ARRAY *keyuse,JOIN_TAB *join_tab,
...
@@ -3139,7 +3142,7 @@ update_ref_and_keys(THD *thd, DYNAMIC_ARRAY *keyuse,JOIN_TAB *join_tab,
{
{
NESTED_JOIN
*
nested_join
=
embedding
->
nested_join
;
NESTED_JOIN
*
nested_join
=
embedding
->
nested_join
;
if
(
nested_join
->
join_list
.
head
()
==
tab
)
if
(
nested_join
->
join_list
.
head
()
==
tab
)
add_key_fields
(
join_tab
,
&
end
,
&
and_level
,
embedding
->
on_expr
,
add_key_fields
(
&
end
,
&
and_level
,
embedding
->
on_expr
,
nested_join
->
used_tables
);
nested_join
->
used_tables
);
}
}
}
}
...
@@ -5174,7 +5177,7 @@ static void add_not_null_conds(JOIN *join)
...
@@ -5174,7 +5177,7 @@ static void add_not_null_conds(JOIN *join)
null_rej
->
quick_fix_field
();
null_rej
->
quick_fix_field
();
DBUG_EXECUTE
(
"where"
,
print_where
(
null_rej
,
DBUG_EXECUTE
(
"where"
,
print_where
(
null_rej
,
referred_tab
->
table
->
table_name
););
referred_tab
->
table
->
alias
););
add_cond_and_fix
(
&
referred_tab
->
select_cond
,
null_rej
);
add_cond_and_fix
(
&
referred_tab
->
select_cond
,
null_rej
);
}
}
}
}
...
@@ -5454,7 +5457,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
...
@@ -5454,7 +5457,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
tab
->
select_cond
=
sel
->
cond
=
NULL
;
tab
->
select_cond
=
sel
->
cond
=
NULL
;
sel
->
head
=
tab
->
table
;
sel
->
head
=
tab
->
table
;
DBUG_EXECUTE
(
"where"
,
print_where
(
tmp
,
tab
->
table
->
table_name
););
DBUG_EXECUTE
(
"where"
,
print_where
(
tmp
,
tab
->
table
->
alias
););
if
(
tab
->
quick
)
if
(
tab
->
quick
)
{
{
/* Use quick key read if it's a constant and it's not used
/* Use quick key read if it's a constant and it's not used
...
...
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