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) ...@@ -206,13 +206,7 @@ IF(SECURITY_HARDENED)
MY_CHECK_AND_SET_COMPILER_FLAG("-pie -fPIC") 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("-Wl,-z,relro,-z,now")
MY_CHECK_AND_SET_COMPILER_FLAG("-fstack-protector --param=ssp-buffer-size=4") MY_CHECK_AND_SET_COMPILER_FLAG("-fstack-protector --param=ssp-buffer-size=4")
MY_CHECK_AND_SET_COMPILER_FLAG("-D_FORTIFY_SOURCE=2" RELEASE RELWITHDEBINFO)
# 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()
ENDIF() ENDIF()
OPTION(ENABLE_DEBUG_SYNC "Enable debug sync (debug builds only)" ON) OPTION(ENABLE_DEBUG_SYNC "Enable debug sync (debug builds only)" ON)
......
...@@ -9,6 +9,7 @@ SET(fail_patterns ...@@ -9,6 +9,7 @@ SET(fail_patterns
FAIL_REGEX "unrecognized .*option" FAIL_REGEX "unrecognized .*option"
FAIL_REGEX "ignoring unknown option" FAIL_REGEX "ignoring unknown option"
FAIL_REGEX "warning:.*ignored" FAIL_REGEX "warning:.*ignored"
FAIL_REGEX "warning:.*redefined"
FAIL_REGEX "[Ww]arning: [Oo]ption" FAIL_REGEX "[Ww]arning: [Oo]ption"
) )
......
...@@ -1412,16 +1412,25 @@ public: ...@@ -1412,16 +1412,25 @@ public:
}; };
/* Functions used by where clause */ /* 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: 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(); longlong val_int();
enum Functype functype() const { return ISNULL_FUNC; } enum Functype functype() const { return ISNULL_FUNC; }
void fix_length_and_dec() void fix_length_and_dec()
{ {
decimals=0; max_length=1; maybe_null=0; Item_func_null_predicate::fix_length_and_dec();
update_used_tables(); update_used_tables();
} }
const char *func_name() const { return "isnull"; } const char *func_name() const { return "isnull"; }
...@@ -1441,9 +1450,7 @@ public: ...@@ -1441,9 +1450,7 @@ public:
} }
} }
table_map not_null_tables() const { return 0; } table_map not_null_tables() const { return 0; }
optimize_type select_optimize() const { return OPTIMIZE_NULL; }
Item *neg_transformer(THD *thd); Item *neg_transformer(THD *thd);
CHARSET_INFO *compare_collation() { return args[0]->collation.collation; }
}; };
/* Functions used by HAVING for rewriting IN subquery */ /* Functions used by HAVING for rewriting IN subquery */
...@@ -1474,25 +1481,19 @@ public: ...@@ -1474,25 +1481,19 @@ public:
}; };
class Item_func_isnotnull :public Item_bool_func class Item_func_isnotnull :public Item_func_null_predicate
{ {
bool abort_on_null; bool abort_on_null;
public: public:
Item_func_isnotnull(Item *a) :Item_bool_func(a), abort_on_null(0) Item_func_isnotnull(Item *a) :Item_func_null_predicate(a), abort_on_null(0)
{ sargable= TRUE; } { }
longlong val_int(); longlong val_int();
enum Functype functype() const { return ISNOTNULL_FUNC; } 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"; } const char *func_name() const { return "isnotnull"; }
optimize_type select_optimize() const { return OPTIMIZE_NULL; }
table_map not_null_tables() const table_map not_null_tables() const
{ return abort_on_null ? not_null_tables_cache : 0; } { return abort_on_null ? not_null_tables_cache : 0; }
Item *neg_transformer(THD *thd); Item *neg_transformer(THD *thd);
virtual void print(String *str, enum_query_type query_type); 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; } 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