summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-08-29 12:56:57 +0300
committerunknown <monty@donna.mysql.com>2000-08-29 12:56:57 +0300
commitc9ed6ae4ccdc85a40e4d05cea31202a339af5c1d (patch)
tree5291eb83639d7dad5beed43c48a3f19890a57a86 /sql/sql_select.cc
parent99a70d04c7b9006b079875d80190d727ffe15bda (diff)
parent52046a7ba3c00111bf27195197b486a9ef558416 (diff)
downloadmariadb-git-c9ed6ae4ccdc85a40e4d05cea31202a339af5c1d.tar.gz
merge
sql/mysqld.cc: Auto merged sql/sql_select.cc: Auto merged
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 6578e3b717a..8bc8091f42a 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -800,6 +800,14 @@ make_join_statistics(JOIN *join,TABLE_LIST *tables,COND *conds,
if ((s->on_expr=tables->on_expr))
{
// table->maybe_null=table->outer_join=1; // Mark for send fields
+ if (!table->file->records)
+ { // Empty table
+ s->key_dependent=s->dependent=0;
+ s->type=JT_SYSTEM;
+ const_table_map|=table->map;
+ set_position(join,const_count++,s,(KEYUSE*) 0);
+ continue;
+ }
s->key_dependent=s->dependent=
s->on_expr->used_tables() & ~(table->map);
s->dependent|=stat_vector[i-1]->dependent | table_vector[i-1]->map;