diff options
Diffstat (limited to 'sql/sys_vars.ic')
-rw-r--r-- | sql/sys_vars.ic | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sql/sys_vars.ic b/sql/sys_vars.ic index e04e09e9bc6..498204deb92 100644 --- a/sql/sys_vars.ic +++ b/sql/sys_vars.ic @@ -325,7 +325,7 @@ public: Class specific constructor arguments: char* values[] - 0-terminated list of strings of valid values - Backing store: uint + Backing store: ulong @note Do *not* use "enum FOO" variables as a backing store, there is no @@ -1271,7 +1271,7 @@ public: default_value, res->ptr(), res->length(), &error, &error_len); - if (error) + if (unlikely(error)) { ErrConvString err(error, error_len, res->charset()); my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), name.str, err.ptr()); @@ -1370,7 +1370,7 @@ public: That is even while empty (zero-length) values are considered errors by find_set(), these errors are ignored here */ - if (error_len) + if (unlikely(error_len)) { ErrConvString err(error, error_len, res->charset()); my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), name.str, err.ptr()); @@ -1465,7 +1465,7 @@ public: plugin= ha_resolve_by_name(thd, &pname, false); else plugin= my_plugin_lock_by_name(thd, &pname, plugin_type); - if (!plugin) + if (unlikely(!plugin)) { // historically different error code if (plugin_type == MYSQL_STORAGE_ENGINE_PLUGIN) @@ -1892,10 +1892,11 @@ public: const char *comment, int flag_args, CMD_LINE getopt, double min_val, double max_val, - PolyLock *lock, enum binlog_status_enum binlog_status_arg) + PolyLock *lock, enum binlog_status_enum binlog_status_arg, + on_check_function on_check_func=0) : Sys_var_double(name_arg, comment, flag_args, 0, sizeof(double), getopt, min_val, - max_val, 0, lock, binlog_status_arg) + max_val, 0, lock, binlog_status_arg, on_check_func) { SYSVAR_ASSERT(scope() == ONLY_SESSION); SYSVAR_ASSERT(getopt.id < 0); // NO_CMD_LINE, because the offset is fake |