diff options
author | unknown <sergefp@mysql.com> | 2004-12-11 15:55:50 +0300 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2004-12-11 15:55:50 +0300 |
commit | c77391b94fd94dd094b40035177fcaa678c9f3ee (patch) | |
tree | 6a05615bea4b44c8dd83626b5770f4b8f1825bb2 /sql | |
parent | da6a5f6ec095b88fb9d0bf63a4d9e4675f1450a8 (diff) | |
parent | 8e4251dd855e81215281b958e97a3dc6b9153a4b (diff) | |
download | mariadb-git-c77391b94fd94dd094b40035177fcaa678c9f3ee.tar.gz |
Fix for BUG#5837 merged from 4.0
sql/sql_select.cc:
Auto merged
sql/table.h:
Auto merged
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_select.cc | 10 | ||||
-rw-r--r-- | sql/table.h | 10 |
2 files changed, 16 insertions, 4 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 9e23163c35e..ba2a227bf95 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -6005,7 +6005,10 @@ join_read_system(JOIN_TAB *tab) { if (error != HA_ERR_END_OF_FILE) return report_error(table, error); - table->null_row=1; // This is ok. + if (tab->on_expr) + mark_as_null_row(tab->table); + else + table->null_row=1; // Why do this for inner join? empty_record(table); // Make empty record return -1; } @@ -6035,7 +6038,10 @@ join_read_const(JOIN_TAB *tab) } if (error) { - table->null_row=1; + if (tab->on_expr) + mark_as_null_row(tab->table); + else + table->null_row=1; empty_record(table); if (error != HA_ERR_KEY_NOT_FOUND) return report_error(table, error); diff --git a/sql/table.h b/sql/table.h index 2eb854f553d..eed9969dac8 100644 --- a/sql/table.h +++ b/sql/table.h @@ -131,8 +131,14 @@ struct st_table { int current_lock; /* Type of lock on table */ enum tmp_table_type tmp_table; my_bool copy_blobs; /* copy_blobs when storing */ - my_bool null_row; /* All columns are null */ - my_bool maybe_null,outer_join; /* Used with OUTER JOIN */ + /* + Used in outer joins: if true, all columns are considered to have NULL + values, including columns declared as "not 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; |