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
b9704ce7
Commit
b9704ce7
authored
Feb 05, 2005
by
sergefp@mysql.com
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-outer-joins-cleanup
parents
34e04c8c
bc1fdfa4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
12 deletions
+15
-12
sql/mysql_priv.h
sql/mysql_priv.h
+1
-1
sql/opt_range.cc
sql/opt_range.cc
+1
-1
sql/sql_base.cc
sql/sql_base.cc
+2
-3
sql/sql_select.cc
sql/sql_select.cc
+2
-2
sql/table.h
sql/table.h
+9
-5
No files found.
sql/mysql_priv.h
View file @
b9704ce7
...
...
@@ -1332,7 +1332,7 @@ inline void setup_table_map(TABLE *table, TABLE_LIST *table_list, uint tablenr)
table
->
null_row
=
0
;
table
->
status
=
STATUS_NO_RECORD
;
table
->
keys_in_use_for_query
=
table
->
s
->
keys_in_use
;
table
->
maybe_null
=
t
est
(
table
->
outer_join
=
table_list
->
outer_join
)
;
table
->
maybe_null
=
t
able_list
->
outer_join
;
table
->
tablenr
=
tablenr
;
table
->
map
=
(
table_map
)
1
<<
tablenr
;
table
->
force_index
=
table_list
->
force_index
;
...
...
sql/opt_range.cc
View file @
b9704ce7
...
...
@@ -3611,7 +3611,7 @@ get_mm_leaf(PARAM *param, COND *conf_func, Field *field, KEY_PART *key_part,
if
(
!
value
)
// IS NULL or IS NOT NULL
{
if
(
field
->
table
->
outer_join
)
// Can't use a key on this
if
(
field
->
table
->
maybe_null
)
// Can't use a key on this
DBUG_RETURN
(
0
);
if
(
!
maybe_null
)
// Not null field
DBUG_RETURN
(
type
==
Item_func
::
ISNULL_FUNC
?
&
null_element
:
0
);
...
...
sql/sql_base.cc
View file @
b9704ce7
...
...
@@ -854,7 +854,7 @@ TABLE *reopen_name_locked_table(THD* thd, TABLE_LIST* table_list)
table
->
tablenr
=
thd
->
current_tablenr
++
;
table
->
used_fields
=
0
;
table
->
const_table
=
0
;
table
->
outer_join
=
table
->
null_row
=
table
->
maybe_null
=
table
->
force_index
=
0
;
table
->
null_row
=
table
->
maybe_null
=
table
->
force_index
=
0
;
table
->
status
=
STATUS_NO_RECORD
;
table
->
keys_in_use_for_query
=
share
->
keys_in_use
;
table
->
used_keys
=
share
->
keys_for_keyread
;
...
...
@@ -1078,7 +1078,7 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
table
->
tablenr
=
thd
->
current_tablenr
++
;
table
->
used_fields
=
0
;
table
->
const_table
=
0
;
table
->
outer_join
=
table
->
null_row
=
table
->
maybe_null
=
table
->
force_index
=
0
;
table
->
null_row
=
table
->
maybe_null
=
table
->
force_index
=
0
;
table
->
status
=
STATUS_NO_RECORD
;
table
->
keys_in_use_for_query
=
table
->
s
->
keys_in_use
;
table
->
insert_values
=
0
;
...
...
@@ -1150,7 +1150,6 @@ bool reopen_table(TABLE *table,bool locked)
tmp
.
tablenr
=
table
->
tablenr
;
tmp
.
used_fields
=
table
->
used_fields
;
tmp
.
const_table
=
table
->
const_table
;
tmp
.
outer_join
=
table
->
outer_join
;
tmp
.
null_row
=
table
->
null_row
;
tmp
.
maybe_null
=
table
->
maybe_null
;
tmp
.
status
=
table
->
status
;
...
...
sql/sql_select.cc
View file @
b9704ce7
...
...
@@ -9181,7 +9181,7 @@ join_read_const_table(JOIN_TAB *tab, POSITION *pos)
tab
->
info
=
"const row not found"
;
/* Mark for EXPLAIN that the row was not found */
pos
->
records_read
=
0.0
;
if
(
!
table
->
outer_join
||
error
>
0
)
if
(
!
table
->
maybe_null
||
error
>
0
)
DBUG_RETURN
(
error
);
}
}
...
...
@@ -9200,7 +9200,7 @@ join_read_const_table(JOIN_TAB *tab, POSITION *pos)
tab
->
info
=
"unique row not found"
;
/* Mark for EXPLAIN that the row was not found */
pos
->
records_read
=
0.0
;
if
(
!
table
->
outer_join
||
error
>
0
)
if
(
!
table
->
maybe_null
||
error
>
0
)
DBUG_RETURN
(
error
);
}
if
(
table
->
key_read
)
...
...
sql/table.h
View file @
b9704ce7
...
...
@@ -217,14 +217,18 @@ struct st_table {
uint
derived_select_number
;
int
current_lock
;
/* Type of lock on table */
my_bool
copy_blobs
;
/* copy_blobs when storing */
/*
0 or JOIN_TYPE_{LEFT|RIGHT}. Currently this is only compared to 0.
If maybe_null !=0, this table is inner w.r.t. some outer join operation,
and null_row may be true.
*/
uint
maybe_null
;
/*
Used in outer joins: if true, all columns are considered to have NULL
values, including columns declared as "not null"
.
If true, the current table row is considered to have all columns set to
NULL, including columns declared as "not null" (see maybe_null)
.
*/
my_bool
null_row
;
/* 0 or JOIN_TYPE_{LEFT|RIGHT}, same as TABLE_LIST::outer_join */
my_bool
outer_join
;
my_bool
maybe_null
;
/* true if (outer_join != 0) */
my_bool
force_index
;
my_bool
distinct
,
const_table
,
no_rows
;
my_bool
key_read
,
no_keyread
;
...
...
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