diff --git a/sql/item.h b/sql/item.h index a38a25d..32353d5 100644 --- a/sql/item.h +++ b/sql/item.h @@ -3421,10 +3421,21 @@ class Item_direct_view_ref :public Item_direct_ref } bool is_null() { + DBUG_ENTER("Item_direct_view_ref::is_null"); if (check_null_ref()) - return 1; + { + DBUG_PRINT("XXX", ("Item_direct_view_ref: ref null")); + DBUG_RETURN(1); + } else - return Item_direct_ref::is_null(); + { + bool res= Item_direct_ref::is_null(); + if (res) + DBUG_PRINT("XXX", ("Item_direct_view_ref: NULL")); + else + DBUG_PRINT("XXX", ("Item_direct_view_ref: %lld is NOT NULL", val_int())); + DBUG_RETURN(res); + } } bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate) { diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 998cb1c..e981455 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -4765,10 +4765,16 @@ Item *and_expressions(Item *a, Item *b, Item **org_item) longlong Item_func_isnull::val_int() { + DBUG_ENTER("Item_func_isnull::val_int"); DBUG_ASSERT(fixed == 1); if (const_item() && !args[0]->maybe_null) - return 0; - return args[0]->is_null() ? 1: 0; + { + DBUG_PRINT("XXX", ("Item_func_isnull: constant 0")); + DBUG_RETURN(0); + } + bool res= args[0]->is_null() ? 1: 0; + DBUG_PRINT("XXX", ("Item_func_isnull: result %d", res)); + DBUG_RETURN(res); }