diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2020-02-11 14:40:35 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2020-02-11 14:40:35 +0100 |
commit | 646d1ec83a57d9a5b380079afc3612c1d9acadd5 (patch) | |
tree | b46ec54915361f3baa221bcd01b4308a55c59c48 /sql | |
parent | c1eaa385ffb44bdf6264d2cc4b4cc0e10284c88a (diff) | |
parent | 58b70dc13630d2f2f0244359d6351085d70fd5dd (diff) | |
download | mariadb-git-646d1ec83a57d9a5b380079afc3612c1d9acadd5.tar.gz |
Merge branch '10.3' into 10.4
Diffstat (limited to 'sql')
-rw-r--r-- | sql/derror.cc | 8 | ||||
-rw-r--r-- | sql/ha_partition.cc | 2 | ||||
-rw-r--r-- | sql/ha_partition.h | 91 | ||||
-rw-r--r-- | sql/log.cc | 34 | ||||
-rw-r--r-- | sql/log.h | 15 | ||||
-rw-r--r-- | sql/my_decimal.cc | 4 | ||||
-rw-r--r-- | sql/my_decimal.h | 2 | ||||
-rw-r--r-- | sql/mysqld.cc | 14 | ||||
-rw-r--r-- | sql/opt_split.cc | 11 | ||||
-rw-r--r-- | sql/sql_acl.cc | 88 | ||||
-rw-r--r-- | sql/sql_parse.cc | 1 | ||||
-rw-r--r-- | sql/sql_partition.cc | 26 | ||||
-rw-r--r-- | sql/sys_vars.ic | 1 | ||||
-rw-r--r-- | sql/table.cc | 1 |
14 files changed, 204 insertions, 94 deletions
diff --git a/sql/derror.cc b/sql/derror.cc index 14b60ee4db4..7a79833c26c 100644 --- a/sql/derror.cc +++ b/sql/derror.cc @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2011, Oracle and/or its affiliates. - Copyright (C) 2011 Monty Program Ab + Copyright (C) 2011, 2020, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -84,8 +84,10 @@ bool init_errmessage(void) if (!use_english) { /* Read messages from file. */ - use_english= !read_texts(ERRMSG_FILE,lang, &original_error_messages); - error= TRUE; + use_english= read_texts(ERRMSG_FILE,lang, &original_error_messages); + error= use_english != FALSE; + if (error) + sql_print_error("Could not load error messages for %s",lang); } if (use_english) diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index f6a6dfda6e3..bcd419562b1 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -6268,7 +6268,7 @@ static range_seq_t partition_multi_range_key_init(void *init_params, ha_partition *partition= hld->partition; uint i= hld->part_id; DBUG_ENTER("partition_multi_range_key_init"); - partition->m_mrr_range_init_flags= flags; + // not used: partition->m_mrr_range_init_flags= flags; hld->partition_part_key_multi_range= partition->m_part_mrr_range_first[i]; DBUG_RETURN(init_params); } diff --git a/sql/ha_partition.h b/sql/ha_partition.h index 17a41b0728a..5b8718cd3ae 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -184,17 +184,61 @@ private: bool is_subpart); }; + +/* + List of ranges to be scanned by ha_partition's MRR implementation + + This object is + - A KEY_MULTI_RANGE structure (the MRR range) + - Storage for the range endpoints that the KEY_MULTI_RANGE has pointers to + - list of such ranges (connected through the "next" pointer). +*/ + typedef struct st_partition_key_multi_range { + /* + Number of the range. The ranges are numbered in the order RANGE_SEQ_IF has + emitted them, starting from 1. The numbering in used by ordered MRR scans. + */ uint id; uchar *key[2]; + /* + Sizes of allocated memory in key[]. These may be larger then the actual + values as this structure is reused across MRR scans + */ uint length[2]; + + /* + The range. + key_multi_range.ptr is a pointer to the this PARTITION_KEY_MULTI_RANGE + object + */ KEY_MULTI_RANGE key_multi_range; + + // Range id from the SQL layer range_id_t ptr; + + // The next element in the list of MRR ranges. st_partition_key_multi_range *next; } PARTITION_KEY_MULTI_RANGE; +/* + List of ranges to be scanned in a certain [sub]partition. + + The idea is that there's a list of ranges to be scanned in the table + (formed by PARTITION_KEY_MULTI_RANGE structures), + and for each [sub]partition, we only need to scan a subset of that list. + + PKMR1 --> PKMR2 --> PKMR3 -->... // list of PARTITION_KEY_MULTI_RANGE + ^ ^ + | | + PPKMR1 ----------> PPKMR2 -->... // list of PARTITION_PART_KEY_MULTI_RANGE + + This way, per-partition lists of PARTITION_PART_KEY_MULTI_RANGE have pointers + to the elements of the global list of PARTITION_KEY_MULTI_RANGE. +*/ + typedef struct st_partition_part_key_multi_range { PARTITION_KEY_MULTI_RANGE *partition_key_multi_range; @@ -203,10 +247,23 @@ typedef struct st_partition_part_key_multi_range class ha_partition; + +/* + The structure holding information about range sequence to be used with one + partition. + (pointer to this is used as seq_init_param for RANGE_SEQ_IF structure when + invoking MRR for an individual partition) +*/ + typedef struct st_partition_part_key_multi_range_hld { + /* Owner object */ ha_partition *partition; + + // id of the the partition this structure is for uint32 part_id; + + // Current range we're iterating through. PARTITION_PART_KEY_MULTI_RANGE *partition_part_key_multi_range; } PARTITION_PART_KEY_MULTI_RANGE_HLD; @@ -813,21 +870,51 @@ public: uint m_mrr_new_full_buffer_size; MY_BITMAP m_mrr_used_partitions; uint *m_stock_range_seq; - uint m_current_range_seq; + // not used: uint m_current_range_seq; + + // Value of mrr_mode passed to ha_partition::multi_range_read_init uint m_mrr_mode; + + // Value of n_ranges passed to ha_partition::multi_range_read_init uint m_mrr_n_ranges; + + /* + Ordered MRR mode: m_range_info[N] has the range_id of the last record that + we've got from partition N. + */ range_id_t *m_range_info; + + // TRUE <=> This ha_partition::multi_range_read_next() call is the first one bool m_multi_range_read_first; - uint m_mrr_range_init_flags; + // not used: uint m_mrr_range_init_flags; + + /* Number of elements in the list pointed by m_mrr_range_first. Not used */ uint m_mrr_range_length; + + // Linked list of ranges to scan PARTITION_KEY_MULTI_RANGE *m_mrr_range_first; PARTITION_KEY_MULTI_RANGE *m_mrr_range_current; + + /* + For each partition: number of ranges MRR scan will scan in the partition + */ uint *m_part_mrr_range_length; + + /* + For each partition: List of ranges to scan in this partition. + */ PARTITION_PART_KEY_MULTI_RANGE **m_part_mrr_range_first; PARTITION_PART_KEY_MULTI_RANGE **m_part_mrr_range_current; PARTITION_PART_KEY_MULTI_RANGE_HLD *m_partition_part_key_multi_range_hld; + + /* + Sequence of ranges to be scanned (TODO: why not stores this in + handler::mrr_{iter,funcs}?) + */ range_seq_t m_seq; RANGE_SEQ_IF *m_seq_if; + + // Range iterator structure to be supplied to partitions RANGE_SEQ_IF m_part_seq_if; virtual int multi_range_key_create_key( diff --git a/sql/log.cc b/sql/log.cc index af22c4993bb..ffeb3661783 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2018, Oracle and/or its affiliates. - Copyright (c) 2009, 2019, MariaDB Corporation + Copyright (c) 2009, 2020, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -3318,7 +3318,7 @@ void MYSQL_BIN_LOG::cleanup() DBUG_ASSERT(!binlog_xid_count_list.head()); WSREP_XID_LIST_ENTRY("MYSQL_BIN_LOG::cleanup(): Removing xid_list_entry " "for %s (%lu)", b); - my_free(b); + delete b; } mysql_mutex_destroy(&LOCK_log); @@ -3683,19 +3683,10 @@ bool MYSQL_BIN_LOG::open(const char *log_name, know from where to start recovery. */ size_t off= dirname_length(log_file_name); - size_t len= strlen(log_file_name) - off; - char *entry_mem, *name_mem; - if (!(new_xid_list_entry = (xid_count_per_binlog *) - my_multi_malloc(MYF(MY_WME), - &entry_mem, sizeof(xid_count_per_binlog), - &name_mem, len, - NULL))) + uint len= static_cast<uint>(strlen(log_file_name) - off); + new_xid_list_entry= new xid_count_per_binlog(log_file_name+off, len); + if (!new_xid_list_entry) goto err; - memcpy(name_mem, log_file_name+off, len); - new_xid_list_entry->binlog_name= name_mem; - new_xid_list_entry->binlog_name_len= (int)len; - new_xid_list_entry->xid_count= 0; - new_xid_list_entry->notify_count= 0; /* Find the name for the Initial binlog checkpoint. @@ -3712,8 +3703,11 @@ bool MYSQL_BIN_LOG::open(const char *log_name, mysql_mutex_unlock(&LOCK_xid_list); if (!b) b= new_xid_list_entry; - strmake(buf, b->binlog_name, b->binlog_name_len); - Binlog_checkpoint_log_event ev(buf, (uint)len); + if (b->binlog_name) + strmake(buf, b->binlog_name, b->binlog_name_len); + else + goto err; + Binlog_checkpoint_log_event ev(buf, len); DBUG_EXECUTE_IF("crash_before_write_checkpoint_event", flush_io_cache(&log_file); mysql_file_sync(log_file.file, MYF(MY_WME)); @@ -3816,7 +3810,7 @@ bool MYSQL_BIN_LOG::open(const char *log_name, { WSREP_XID_LIST_ENTRY("MYSQL_BIN_LOG::open(): Removing xid_list_entry for " "%s (%lu)", b); - my_free(binlog_xid_count_list.get()); + delete binlog_xid_count_list.get(); } mysql_cond_broadcast(&COND_xid_list); WSREP_XID_LIST_ENTRY("MYSQL_BIN_LOG::open(): Adding new xid_list_entry for " @@ -3866,7 +3860,7 @@ err: #endif sql_print_error(fatal_log_error, name, tmp_errno); if (new_xid_list_entry) - my_free(new_xid_list_entry); + delete new_xid_list_entry; if (file >= 0) mysql_file_close(file, MYF(0)); close(LOG_CLOSE_INDEX); @@ -4354,7 +4348,7 @@ err: DBUG_ASSERT(b->xid_count == 0); WSREP_XID_LIST_ENTRY("MYSQL_BIN_LOG::reset_logs(): Removing " "xid_list_entry for %s (%lu)", b); - my_free(binlog_xid_count_list.get()); + delete binlog_xid_count_list.get(); } mysql_cond_broadcast(&COND_xid_list); reset_master_pending--; @@ -9900,7 +9894,7 @@ TC_LOG_BINLOG::mark_xid_done(ulong binlog_id, bool write_checkpoint) break; WSREP_XID_LIST_ENTRY("TC_LOG_BINLOG::mark_xid_done(): Removing " "xid_list_entry for %s (%lu)", b); - my_free(binlog_xid_count_list.get()); + delete binlog_xid_count_list.get(); } mysql_mutex_unlock(&LOCK_xid_list); diff --git a/sql/log.h b/sql/log.h index 52bab149381..eef81c46ac4 100644 --- a/sql/log.h +++ b/sql/log.h @@ -1,5 +1,5 @@ /* Copyright (c) 2005, 2016, Oracle and/or its affiliates. - Copyright (c) 2009, 2017, MariaDB Corporation. + Copyright (c) 2009, 2020, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -593,7 +593,18 @@ public: long notify_count; /* For linking in requests to the binlog background thread. */ xid_count_per_binlog *next_in_queue; - xid_count_per_binlog(); /* Give link error if constructor used. */ + xid_count_per_binlog(char *log_file_name, uint log_file_name_len) + :binlog_id(0), xid_count(0), notify_count(0) + { + binlog_name_len= log_file_name_len; + binlog_name= (char *) my_malloc(binlog_name_len, MYF(MY_ZEROFILL)); + if (binlog_name) + memcpy(binlog_name, log_file_name, binlog_name_len); + } + ~xid_count_per_binlog() + { + my_free(binlog_name); + } }; I_List<xid_count_per_binlog> binlog_xid_count_list; mysql_mutex_t LOCK_binlog_background_thread; diff --git a/sql/my_decimal.cc b/sql/my_decimal.cc index b974026bb65..edf3e82de40 100644 --- a/sql/my_decimal.cc +++ b/sql/my_decimal.cc @@ -345,12 +345,12 @@ void my_decimal_trim(ulonglong *precision, uint *scale) */ int my_decimal2int(uint mask, const decimal_t *d, bool unsigned_flag, - longlong *l) + longlong *l, decimal_round_mode round_type) { int res; my_decimal rounded; /* decimal_round can return only E_DEC_TRUNCATED */ - decimal_round(d, &rounded, 0, HALF_UP); + decimal_round(d, &rounded, 0, round_type); res= (unsigned_flag ? decimal2ulonglong(&rounded, (ulonglong *) l) : decimal2longlong(&rounded, l)); diff --git a/sql/my_decimal.h b/sql/my_decimal.h index 9910f436e05..a7f6fc9e88d 100644 --- a/sql/my_decimal.h +++ b/sql/my_decimal.h @@ -373,7 +373,7 @@ my_decimal *seconds2my_decimal(bool sign, ulonglong sec, ulong microsec, (TIME)->second_part, (DECIMAL)) int my_decimal2int(uint mask, const decimal_t *d, bool unsigned_flag, - longlong *l); + longlong *l, decimal_round_mode round_type= HALF_UP); inline int my_decimal2double(uint, const decimal_t *d, double *result) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 96f4dd1095b..439437d6541 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -4192,7 +4192,7 @@ static int init_common_variables() min_connections= 10; /* MyISAM requires two file handles per table. */ wanted_files= (extra_files + max_connections + extra_max_connections + - tc_size * 2); + tc_size * 2 * tc_instances); #if defined(HAVE_POOL_OF_THREADS) && !defined(__WIN__) // add epoll or kevent fd for each threadpool group, in case pool of threads is used wanted_files+= (thread_handling > SCHEDULER_NO_THREADS) ? 0 : threadpool_size; @@ -4221,6 +4221,14 @@ static int init_common_variables() if (files < wanted_files && global_system_variables.log_warnings) sql_print_warning("Could not increase number of max_open_files to more than %u (request: %u)", files, wanted_files); + /* If we required too much tc_instances than we reduce */ + SYSVAR_AUTOSIZE_IF_CHANGED(tc_instances, + (uint32) MY_MIN(MY_MAX((files - extra_files - + max_connections)/ + 2/tc_size, + 1), + tc_instances), + uint32); /* If we have requested too much file handles than we bring max_connections in supported bounds. Still leave at least @@ -4228,7 +4236,7 @@ static int init_common_variables() */ SYSVAR_AUTOSIZE_IF_CHANGED(max_connections, (ulong) MY_MAX(MY_MIN(files- extra_files- - min_tc_size*2, + min_tc_size*2*tc_instances, max_connections), min_connections), ulong); @@ -4241,7 +4249,7 @@ static int init_common_variables() */ SYSVAR_AUTOSIZE_IF_CHANGED(tc_size, (ulong) MY_MIN(MY_MAX((files - extra_files - - max_connections) / 2, + max_connections) / 2 / tc_instances, min_tc_size), tc_size), ulong); DBUG_PRINT("warning", diff --git a/sql/opt_split.cc b/sql/opt_split.cc index cfac0c93544..6f8248c315c 100644 --- a/sql/opt_split.cc +++ b/sql/opt_split.cc @@ -307,7 +307,7 @@ struct SplM_field_ext_info: public SplM_field_info 8. P contains some references on the columns of the joined tables C occurred also in the select list of this join 9. There are defined some keys usable for ref access of fields from C - with available statistics. + with available statistics. @retval true if the answer is positive @@ -477,6 +477,15 @@ bool JOIN::check_for_splittable_materialized() /* Attach this info to the table T */ derived->table->set_spl_opt_info(spl_opt_info); + /* + If this is specification of a materialized derived table T that is + potentially splittable and is used in the from list of the right operand + of an IN predicand transformed to a semi-join then the embedding semi-join + nest is not allowed to be materialized. + */ + if (derived && derived->is_materialized_derived() && + derived->embedding && derived->embedding->sj_subq_pred) + derived->embedding->sj_subq_pred->types_allow_materialization= FALSE; return true; } diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index b986c854391..457120d518b 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -8688,13 +8688,12 @@ static void add_user_option(String *grant, double value, const char *name) } } -static void add_user_parameters(String *result, ACL_USER* acl_user, +static void add_user_parameters(THD *thd, String *result, ACL_USER* acl_user, bool with_grant) { - result->append(STRING_WITH_LEN("@'")); - result->append(acl_user->host.hostname, acl_user->hostname_length, - system_charset_info); - result->append('\''); + result->append('@'); + append_identifier(thd, result, acl_user->host.hostname, + acl_user->hostname_length); if (acl_user->nauth == 1 && (acl_user->auth->plugin.str == native_password_plugin_name.str || @@ -8885,11 +8884,9 @@ bool mysql_show_create_user(THD *thd, LEX_USER *lex_user) goto end; } - result.append("CREATE USER '"); - result.append(username); - result.append('\''); - - add_user_parameters(&result, acl_user, false); + result.append("CREATE USER "); + append_identifier(thd, &result, username, strlen(username)); + add_user_parameters(thd, &result, acl_user, false); if (acl_user->password_expired) result.append(STRING_WITH_LEN(" PASSWORD EXPIRE")); @@ -9148,17 +9145,14 @@ static bool show_role_grants(THD *thd, const char *username, grant.append(STRING_WITH_LEN("GRANT ")); ACL_ROLE *acl_role= *(dynamic_element(&acl_entry->role_grants, counter, ACL_ROLE**)); - grant.append(acl_role->user.str, acl_role->user.length, - system_charset_info); - grant.append(STRING_WITH_LEN(" TO '")); - grant.append(acl_entry->user.str, acl_entry->user.length, - system_charset_info); + append_identifier(thd, &grant, acl_role->user.str, acl_role->user.length); + grant.append(STRING_WITH_LEN(" TO ")); + append_identifier(thd, &grant, acl_entry->user.str, acl_entry->user.length); if (!(acl_entry->flags & IS_ROLE)) { - grant.append(STRING_WITH_LEN("'@'")); - grant.append(&host); + grant.append('@'); + append_identifier(thd, &grant, host.str, host.length); } - grant.append('\''); ROLE_GRANT_PAIR *pair= find_role_grant_pair(&acl_entry->user, &host, &acl_role->user); @@ -9212,13 +9206,12 @@ static bool show_global_privileges(THD *thd, ACL_USER_BASE *acl_entry, } } } - global.append (STRING_WITH_LEN(" ON *.* TO '")); - global.append(acl_entry->user.str, acl_entry->user.length, - system_charset_info); - global.append('\''); + global.append (STRING_WITH_LEN(" ON *.* TO ")); + append_identifier(thd, &global, acl_entry->user.str, acl_entry->user.length); if (!handle_as_role) - add_user_parameters(&global, (ACL_USER *)acl_entry, (want_access & GRANT_ACL)); + add_user_parameters(thd, &global, (ACL_USER *)acl_entry, + (want_access & GRANT_ACL)); protocol->prepare_for_resend(); protocol->store(global.ptr(),global.length(),global.charset()); @@ -9229,6 +9222,21 @@ static bool show_global_privileges(THD *thd, ACL_USER_BASE *acl_entry, } + +static void add_to_user(THD *thd, String *result, const char *user, + bool is_user, const char *host) +{ + result->append(STRING_WITH_LEN(" TO ")); + append_identifier(thd, result, user, strlen(user)); + if (is_user) + { + result->append('@'); + // host and lex_user->host are equal except for case + append_identifier(thd, result, host, strlen(host)); + } +} + + static bool show_database_privileges(THD *thd, const char *username, const char *hostname, char *buff, size_t buffsize) @@ -9289,16 +9297,8 @@ static bool show_database_privileges(THD *thd, const char *username, } db.append (STRING_WITH_LEN(" ON ")); append_identifier(thd, &db, acl_db->db, strlen(acl_db->db)); - db.append (STRING_WITH_LEN(".* TO '")); - db.append(username, strlen(username), - system_charset_info); - if (*hostname) - { - db.append (STRING_WITH_LEN("'@'")); - // host and lex_user->host are equal except for case - db.append(host, strlen(host), system_charset_info); - } - db.append ('\''); + db.append (STRING_WITH_LEN(".*")); + add_to_user(thd, &db, username, (*hostname), host); if (want_access & GRANT_ACL) db.append(STRING_WITH_LEN(" WITH GRANT OPTION")); protocol->prepare_for_resend(); @@ -9429,16 +9429,7 @@ static bool show_table_and_column_privileges(THD *thd, const char *username, global.append('.'); append_identifier(thd, &global, grant_table->tname, strlen(grant_table->tname)); - global.append(STRING_WITH_LEN(" TO '")); - global.append(username, strlen(username), - system_charset_info); - if (*hostname) - { - global.append(STRING_WITH_LEN("'@'")); - // host and lex_user->host are equal except for case - global.append(host, strlen(host), system_charset_info); - } - global.append('\''); + add_to_user(thd, &global, username, (*hostname), host); if (table_access & GRANT_ACL) global.append(STRING_WITH_LEN(" WITH GRANT OPTION")); protocol->prepare_for_resend(); @@ -9524,16 +9515,7 @@ static int show_routine_grants(THD* thd, global.append('.'); append_identifier(thd, &global, grant_proc->tname, strlen(grant_proc->tname)); - global.append(STRING_WITH_LEN(" TO '")); - global.append(username, strlen(username), - system_charset_info); - if (*hostname) - { - global.append(STRING_WITH_LEN("'@'")); - // host and lex_user->host are equal except for case - global.append(host, strlen(host), system_charset_info); - } - global.append('\''); + add_to_user(thd, &global, username, (*hostname), host); if (proc_access & GRANT_ACL) global.append(STRING_WITH_LEN(" WITH GRANT OPTION")); protocol->prepare_for_resend(); diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 2c74f15aa17..9af4afd4b03 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1844,7 +1844,6 @@ bool dispatch_command(enum enum_server_command command, THD *thd, while (!thd->killed && (parser_state.m_lip.found_semicolon != NULL) && ! thd->is_error()) { - thd->get_stmt_da()->set_skip_flush(); /* Multiple queries exist, execute them individually */ diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index 0c7be11bd59..12198d34c88 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -2836,14 +2836,34 @@ bool partition_key_modified(TABLE *table, const MY_BITMAP *fields) static inline int part_val_int(Item *item_expr, longlong *result) { - *result= item_expr->val_int(); + switch (item_expr->cmp_type()) + { + case DECIMAL_RESULT: + { + my_decimal buf; + my_decimal *val= item_expr->val_decimal(&buf); + if (val && my_decimal2int(E_DEC_FATAL_ERROR, val, item_expr->unsigned_flag, + result, FLOOR) != E_DEC_OK) + return true; + break; + } + case INT_RESULT: + *result= item_expr->val_int(); + break; + case STRING_RESULT: + case REAL_RESULT: + case ROW_RESULT: + case TIME_RESULT: + DBUG_ASSERT(0); + break; + } if (item_expr->null_value) { if (unlikely(current_thd->is_error())) - return TRUE; + return true; *result= LONGLONG_MIN; } - return FALSE; + return false; } diff --git a/sql/sys_vars.ic b/sql/sys_vars.ic index e983347f4ce..f33f469b160 100644 --- a/sql/sys_vars.ic +++ b/sql/sys_vars.ic @@ -2634,7 +2634,6 @@ public: if (!Sys_var_enum::do_check(thd, var)) return false; MYSQL_TIME ltime; - // FIXME: please resolve both conflicts to "old" and remove this comment Datetime::Options opt(TIME_CONV_NONE | TIME_NO_ZERO_IN_DATE | TIME_NO_ZERO_DATE, thd); diff --git a/sql/table.cc b/sql/table.cc index 1d5aaf7e574..6426cb57524 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -4668,7 +4668,6 @@ bool check_column_name(const char *name) been opened. @param[in] table The table to check - @param[in] table_f_count Expected number of columns in the table @param[in] table_def Expected structure of the table (column name and type) |