diff options
Diffstat (limited to 'sql/item.h')
-rw-r--r-- | sql/item.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/item.h b/sql/item.h index ea17668d47d..113e8bdcb9c 100644 --- a/sql/item.h +++ b/sql/item.h @@ -3307,13 +3307,16 @@ class Item_direct_view_ref :public Item_direct_ref TABLE_LIST *view; TABLE *null_ref_table; +#define NO_NULL_TABLE (reinterpret_cast<TABLE *>(0x1)) + bool check_null_ref() { if (null_ref_table == NULL) { - null_ref_table= view->get_real_join_table(); + if (!(null_ref_table= view->get_real_join_table())) + null_ref_table= NO_NULL_TABLE; } - if (null_ref_table->null_row) + if (null_ref_table != NO_NULL_TABLE && null_ref_table->null_row) { null_value= 1; return TRUE; |