Commit 3aa1a600 authored by Oleksandr Byelkin's avatar Oleksandr Byelkin

Merge branch '10.1' of github.com:MariaDB/server into 10.1

parents be73c7ee 52a1b5a8
......@@ -206,13 +206,7 @@ IF(SECURITY_HARDENED)
MY_CHECK_AND_SET_COMPILER_FLAG("-pie -fPIC")
MY_CHECK_AND_SET_COMPILER_FLAG("-Wl,-z,relro,-z,now")
MY_CHECK_AND_SET_COMPILER_FLAG("-fstack-protector --param=ssp-buffer-size=4")
# sometimes _FORTIFY_SOURCE is predefined
INCLUDE(CheckSymbolExists)
CHECK_SYMBOL_EXISTS(_FORTIFY_SOURCE "" HAVE_FORTIFY_SOURCE)
IF(NOT HAVE_FORTIFY_SOURCE)
ADD_DEFINITIONS(-D_FORTIFY_SOURCE=2)
ENDIF()
MY_CHECK_AND_SET_COMPILER_FLAG("-D_FORTIFY_SOURCE=2" RELEASE RELWITHDEBINFO)
ENDIF()
OPTION(ENABLE_DEBUG_SYNC "Enable debug sync (debug builds only)" ON)
......
......@@ -9,6 +9,7 @@ SET(fail_patterns
FAIL_REGEX "unrecognized .*option"
FAIL_REGEX "ignoring unknown option"
FAIL_REGEX "warning:.*ignored"
FAIL_REGEX "warning:.*redefined"
FAIL_REGEX "[Ww]arning: [Oo]ption"
)
......
......@@ -1412,16 +1412,25 @@ class in_row :public in_vector
};
/* Functions used by where clause */
class Item_func_null_predicate :public Item_bool_func
{
public:
Item_func_null_predicate(Item *a) :Item_bool_func(a) { sargable= true; }
optimize_type select_optimize() const { return OPTIMIZE_NULL; }
CHARSET_INFO *compare_collation() { return args[0]->collation.collation; }
void fix_length_and_dec() { decimals=0; max_length=1; maybe_null=0; }
};
class Item_func_isnull :public Item_bool_func
class Item_func_isnull :public Item_func_null_predicate
{
public:
Item_func_isnull(Item *a) :Item_bool_func(a) { sargable= TRUE; }
Item_func_isnull(Item *a) :Item_func_null_predicate(a) {}
longlong val_int();
enum Functype functype() const { return ISNULL_FUNC; }
void fix_length_and_dec()
{
decimals=0; max_length=1; maybe_null=0;
Item_func_null_predicate::fix_length_and_dec();
update_used_tables();
}
const char *func_name() const { return "isnull"; }
......@@ -1441,9 +1450,7 @@ class Item_func_isnull :public Item_bool_func
}
}
table_map not_null_tables() const { return 0; }
optimize_type select_optimize() const { return OPTIMIZE_NULL; }
Item *neg_transformer(THD *thd);
CHARSET_INFO *compare_collation() { return args[0]->collation.collation; }
};
/* Functions used by HAVING for rewriting IN subquery */
......@@ -1474,25 +1481,19 @@ class Item_is_not_null_test :public Item_func_isnull
};
class Item_func_isnotnull :public Item_bool_func
class Item_func_isnotnull :public Item_func_null_predicate
{
bool abort_on_null;
public:
Item_func_isnotnull(Item *a) :Item_bool_func(a), abort_on_null(0)
{ sargable= TRUE; }
Item_func_isnotnull(Item *a) :Item_func_null_predicate(a), abort_on_null(0)
{ }
longlong val_int();
enum Functype functype() const { return ISNOTNULL_FUNC; }
void fix_length_and_dec()
{
decimals=0; max_length=1; maybe_null=0;
}
const char *func_name() const { return "isnotnull"; }
optimize_type select_optimize() const { return OPTIMIZE_NULL; }
table_map not_null_tables() const
{ return abort_on_null ? not_null_tables_cache : 0; }
Item *neg_transformer(THD *thd);
virtual void print(String *str, enum_query_type query_type);
CHARSET_INFO *compare_collation() { return args[0]->collation.collation; }
void top_level_item() { abort_on_null=1; }
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment