diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-04-02 11:04:54 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-04-02 11:04:54 +0300 |
commit | 5c3ff5cb93f8363820d506cdad3daafbc944f03b (patch) | |
tree | f5671e95dabd8ced0c7925e54b351bd704e41bcf /sql | |
parent | f9ab7b473a935141f85d27994d0faf3433a73144 (diff) | |
parent | 7b42d892de6acc04490f5cb6b8355c72b8f1a406 (diff) | |
download | mariadb-git-5c3ff5cb93f8363820d506cdad3daafbc944f03b.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'sql')
-rw-r--r-- | sql/field.cc | 7 | ||||
-rw-r--r-- | sql/ha_partition.h | 16 | ||||
-rw-r--r-- | sql/handler.cc | 32 | ||||
-rw-r--r-- | sql/handler.h | 8 | ||||
-rw-r--r-- | sql/item.h | 2 | ||||
-rw-r--r-- | sql/item_vers.cc | 3 | ||||
-rw-r--r-- | sql/log.cc | 6 | ||||
-rw-r--r-- | sql/mysqld.cc | 3 | ||||
-rw-r--r-- | sql/partition_element.h | 15 | ||||
-rw-r--r-- | sql/share/errmsg-utf8.txt | 35 | ||||
-rw-r--r-- | sql/slave.cc | 6 | ||||
-rw-r--r-- | sql/sp_head.cc | 3 | ||||
-rw-r--r-- | sql/spatial.cc | 12 | ||||
-rw-r--r-- | sql/sql_admin.cc | 6 | ||||
-rw-r--r-- | sql/sql_class.cc | 22 | ||||
-rw-r--r-- | sql/sql_class.h | 3 | ||||
-rw-r--r-- | sql/sql_parse.cc | 2 | ||||
-rw-r--r-- | sql/sql_partition.cc | 8 | ||||
-rw-r--r-- | sql/sql_statistics.cc | 10 | ||||
-rw-r--r-- | sql/sql_table.cc | 5 | ||||
-rw-r--r-- | sql/sql_update.cc | 1 | ||||
-rw-r--r-- | sql/table.cc | 6 | ||||
-rw-r--r-- | sql/winservice.c | 2 |
23 files changed, 89 insertions, 124 deletions
diff --git a/sql/field.cc b/sql/field.cc index 54063d7fcb5..c752a58cbd6 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -6938,8 +6938,11 @@ Field_longstr::check_string_copy_error(const String_copier *copier, if (likely(!(pos= copier->most_important_error_pos()))) return FALSE; - convert_to_printable(tmp, sizeof(tmp), pos, (end - pos), cs, 6); - set_warning_truncated_wrong_value("string", tmp); + if (!is_stat_field) + { + convert_to_printable(tmp, sizeof(tmp), pos, (end - pos), cs, 6); + set_warning_truncated_wrong_value("string", tmp); + } return TRUE; } diff --git a/sql/ha_partition.h b/sql/ha_partition.h index f385ceb6d3b..5913b3d2aa8 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -412,6 +412,22 @@ public: virtual void return_record_by_parent(); + virtual bool vers_can_native(THD *thd) + { + if (thd->lex->part_info) + { + // PARTITION BY SYSTEM_TIME is not supported for now + return thd->lex->part_info->part_type != VERSIONING_PARTITION; + } + else + { + bool can= true; + for (uint i= 0; i < m_tot_parts && can; i++) + can= can && m_file[i]->vers_can_native(thd); + return can; + } + } + /* ------------------------------------------------------------------------- MODULE create/delete handler object diff --git a/sql/handler.cc b/sql/handler.cc index da7850c5c4e..a9890b0ffd9 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -7403,28 +7403,6 @@ bool Vers_parse_info::fix_implicit(THD *thd, Alter_info *alter_info) return false; } -bool Table_scope_and_contents_source_pod_st::vers_native(THD *thd) const -{ - if (ha_check_storage_engine_flag(db_type, HTON_NATIVE_SYS_VERSIONING)) - return true; - -#ifdef WITH_PARTITION_STORAGE_ENGINE - partition_info *info= thd->work_part_info; - if (info && !(used_fields & HA_CREATE_USED_ENGINE)) - { - if (handlerton *hton= info->default_engine_type) - return ha_check_storage_engine_flag(hton, HTON_NATIVE_SYS_VERSIONING); - - List_iterator_fast<partition_element> it(info->partitions); - while (partition_element *partition_element= it++) - { - if (partition_element->find_engine_flag(HTON_NATIVE_SYS_VERSIONING)) - return true; - } - } -#endif - return false; -} bool Table_scope_and_contents_source_st::vers_fix_system_fields( THD *thd, Alter_info *alter_info, const TABLE_LIST &create_table, @@ -7501,7 +7479,7 @@ bool Table_scope_and_contents_source_st::vers_check_system_fields( if (!(options & HA_VERSIONED_TABLE)) return false; return vers_info.check_sys_fields(create_table.table_name, create_table.db, - alter_info, vers_native(thd)); + alter_info); } @@ -7610,8 +7588,7 @@ bool Vers_parse_info::fix_alter_info(THD *thd, Alter_info *alter_info, if (alter_info->flags & ALTER_ADD_SYSTEM_VERSIONING) { - bool native= create_info->vers_native(thd); - if (check_sys_fields(table_name, share->db, alter_info, native)) + if (check_sys_fields(table_name, share->db, alter_info)) return true; } @@ -7718,7 +7695,7 @@ bool Vers_parse_info::check_conditions(const Lex_table_name &table_name, bool Vers_parse_info::check_sys_fields(const Lex_table_name &table_name, const Lex_table_name &db, - Alter_info *alter_info, bool native) + Alter_info *alter_info) { if (check_conditions(table_name, db)) return true; @@ -7749,8 +7726,7 @@ bool Vers_parse_info::check_sys_fields(const Lex_table_name &table_name, { f_check_unit= VERS_TIMESTAMP; } - else if (native - && f->type_handler() == &type_handler_longlong + else if (f->type_handler() == &type_handler_longlong && (f->flags & UNSIGNED_FLAG) && f->length == (MY_INT64_NUM_DECIMAL_DIGITS - 1)) { diff --git a/sql/handler.h b/sql/handler.h index 4c1a53cc570..d7559a21445 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -2056,7 +2056,7 @@ public: TABLE_LIST &src_table, TABLE_LIST &table); bool check_sys_fields(const Lex_table_name &table_name, const Lex_table_name &db, - Alter_info *alter_info, bool native); + Alter_info *alter_info); /** At least one field was specified 'WITH/WITHOUT SYSTEM VERSIONING'. @@ -2140,8 +2140,6 @@ struct Table_scope_and_contents_source_pod_st // For trivial members bool table_was_deleted; sequence_definition *seq_create_info; - bool vers_native(THD *thd) const; - void init() { bzero(this, sizeof(*this)); @@ -3576,6 +3574,10 @@ public: ha_pre_index_end() : pre_inited == RND ? ha_pre_rnd_end() : 0 ); } + virtual bool vers_can_native(THD *thd) + { + return ht->flags & HTON_NATIVE_SYS_VERSIONING; + } /** @brief diff --git a/sql/item.h b/sql/item.h index 5486aed1f94..c46877231f6 100644 --- a/sql/item.h +++ b/sql/item.h @@ -525,7 +525,7 @@ class Rewritable_query_parameter Value of 0 means that this object doesn't have to be replaced (for example SP variables in control statements) */ - uint pos_in_query; + my_ptrdiff_t pos_in_query; /* Byte length of parameter name in the statement. This is not diff --git a/sql/item_vers.cc b/sql/item_vers.cc index c4bb734096f..c8f1c793895 100644 --- a/sql/item_vers.cc +++ b/sql/item_vers.cc @@ -61,10 +61,7 @@ Item_func_trt_ts::get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate) null_value= !trt.query(trx_id); if (null_value) - { - my_error(ER_VERS_NO_TRX_ID, MYF(0), (longlong) trx_id); return true; - } return trt[trt_field]->get_date(res, fuzzydate); } diff --git a/sql/log.cc b/sql/log.cc index 97f86da0b90..0e0a79d4558 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -9747,9 +9747,9 @@ TC_LOG_BINLOG::log_and_order(THD *thd, my_xid xid, bool all, */ if (!xid || !need_unlog) DBUG_RETURN(BINLOG_COOKIE_DUMMY(cache_mngr->delayed_error)); - else - DBUG_RETURN(BINLOG_COOKIE_MAKE(cache_mngr->binlog_id, - cache_mngr->delayed_error)); + + DBUG_RETURN(BINLOG_COOKIE_MAKE(cache_mngr->binlog_id, + cache_mngr->delayed_error)); } /* diff --git a/sql/mysqld.cc b/sql/mysqld.cc index f17e8d45309..e28ec64089e 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -8390,7 +8390,8 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument) val= p--; while (my_isspace(mysqld_charset, *p) && p > argument) *p-- = 0; - if (p == argument) + /* Db name can be one char also */ + if (p == argument && my_isspace(mysqld_charset, *p)) { sql_print_error("Bad syntax in replicate-rewrite-db - empty FROM db!"); return 1; diff --git a/sql/partition_element.h b/sql/partition_element.h index 45900c77cfc..2c89562adda 100644 --- a/sql/partition_element.h +++ b/sql/partition_element.h @@ -176,21 +176,6 @@ public: DBUG_ASSERT(ev->col_val_array); return ev->col_val_array[idx]; } - - bool find_engine_flag(uint32 flag) - { - if (ha_check_storage_engine_flag(engine_type, flag)) - return true; - - List_iterator_fast<partition_element> it(subpartitions); - while (partition_element *element= it++) - { - if (element->find_engine_flag(flag)) - return true; - } - - return false; - } }; #endif /* PARTITION_ELEMENT_INCLUDED */ diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt index 3827f83da5f..db38b157406 100644 --- a/sql/share/errmsg-utf8.txt +++ b/sql/share/errmsg-utf8.txt @@ -2377,31 +2377,8 @@ ER_TABLE_NOT_LOCKED spa "Tabla '%-.192s' no fue trabada con LOCK TABLES" swe "Tabell '%-.192s' är inte låst med LOCK TABLES" ukr "Таблицю '%-.192s' не було блоковано з LOCK TABLES" -ER_BLOB_CANT_HAVE_DEFAULT 42000 - cze "Blob položka '%-.192s' nemůže mít defaultní hodnotu" - dan "BLOB feltet '%-.192s' kan ikke have en standard værdi" - nla "Blob veld '%-.192s' can geen standaardwaarde bevatten" - eng "BLOB/TEXT column '%-.192s' can't have a default value" - est "BLOB-tüüpi tulp '%-.192s' ei saa omada vaikeväärtust" - fre "BLOB '%-.192s' ne peut avoir de valeur par défaut" - ger "BLOB/TEXT-Feld '%-.192s' darf keinen Vorgabewert (DEFAULT) haben" - greek "Τα Blob πεδία '%-.192s' δεν μπορούν να έχουν προκαθορισμένες τιμές (default value)" - hindi "BLOB/TEXT कॉलम '%-.192s' का डिफ़ॉल्ट मान नहीं हो सकता" - hun "A(z) '%-.192s' blob objektumnak nem lehet alapertelmezett erteke" - ita "Il campo BLOB '%-.192s' non puo` avere un valore di default" - jpn "BLOB/TEXT 列 '%-.192s' にはデフォルト値を指定できません。" - kor "BLOB 칼럼 '%-.192s' 는 디폴트 값을 가질 수 없습니다." - nor "Blob feltet '%-.192s' kan ikke ha en standard verdi" - norwegian-ny "Blob feltet '%-.192s' kan ikkje ha ein standard verdi" - pol "Pole typu blob '%-.192s' nie może mieć domy?lnej warto?ci" - por "Coluna BLOB '%-.192s' não pode ter um valor padrão (default)" - rum "Coloana BLOB '%-.192s' nu poate avea o valoare default" - rus "Невозможно указывать значение по умолчанию для столбца BLOB '%-.192s'" - serbian "BLOB kolona '%-.192s' ne može imati default vrednost" - slo "Pole BLOB '%-.192s' nemôže mať implicitnú hodnotu" - spa "Campo Blob '%-.192s' no puede tener valores patron" - swe "BLOB fält '%-.192s' kan inte ha ett DEFAULT-värde" - ukr "Стовбець BLOB '%-.192s' не може мати значення по замовчуванню" +ER_UNUSED_17 + eng "You should never see it" ER_WRONG_DB_NAME 42000 cze "Nepřípustné jméno databáze '%-.100s'" dan "Ugyldigt database navn '%-.100s'" @@ -7177,7 +7154,7 @@ ER_KEY_BASED_ON_GENERATED_VIRTUAL_COLUMN ER_WRONG_FK_OPTION_FOR_GENERATED_COLUMN eng "Cannot define foreign key with %s clause on a generated column" ER_WARNING_NON_DEFAULT_VALUE_FOR_GENERATED_COLUMN - eng "The value specified for generated column '%s' in table '%s' ignored" + eng "The value specified for generated column '%s' in table '%s' has been ignored" ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN eng "This is not yet supported for generated columns" ER_UNUSED_20 @@ -7829,7 +7806,7 @@ ER_VERS_FIELD_WRONG_TYPE eng "%`s must be of type %s for system-versioned table %`s" ER_VERS_ENGINE_UNSUPPORTED - eng "Transaction system versioning for %`s is not supported" + eng "Transaction-precise system versioning for %`s is not supported" ER_UNUSED_23 eng "You should never see it" @@ -7909,8 +7886,8 @@ ER_UNUSED_24 ER_VERS_TEMPORARY eng "TEMPORARY tables do not support system versioning" -ER_VERS_NOT_SUPPORTED - eng "%s is not supported for %s system-versioned tables" +ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED + eng "Transaction-precise system versioned tables do not support partitioning by ROW START or ROW END" ER_INDEX_FILE_FULL eng "The index file for table '%-.192s' is full" ER_UPDATED_COLUMN_ONLY_ONCE diff --git a/sql/slave.cc b/sql/slave.cc index f5bfd0f1974..52cecf2fd36 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -3912,12 +3912,6 @@ apply_event_and_update_pos_setup(Log_event* ev, THD* thd, rpl_group_info *rgi) thd->variables.server_id = ev->server_id; thd->set_time(); // time the query thd->lex->current_select= 0; - if (!ev->when) - { - my_hrtime_t hrtime= my_hrtime(); - ev->when= hrtime_to_my_time(hrtime); - ev->when_sec_part= hrtime_sec_part(hrtime); - } thd->variables.option_bits= (thd->variables.option_bits & ~OPTION_SKIP_REPLICATION) | (ev->flags & LOG_EVENT_SKIP_REPLICATION_F ? OPTION_SKIP_REPLICATION : 0); diff --git a/sql/sp_head.cc b/sql/sp_head.cc index dc5123efe36..bd4d74c58a8 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -532,6 +532,7 @@ sp_head::sp_head(sp_package *parent, const Sp_handler *sph, DBUG_ENTER("sp_head::sp_head"); + m_security_ctx.init(); m_backpatch.empty(); m_backpatch_goto.empty(); m_cont_backpatch.empty(); @@ -1338,7 +1339,7 @@ sp_head::execute(THD *thd, bool merge_da_on_success) if (WSREP(thd) && thd->wsrep_next_trx_id() == WSREP_UNDEFINED_TRX_ID) { thd->set_wsrep_next_trx_id(thd->query_id); - WSREP_DEBUG("assigned new next trx ID for SP, trx id: %lu", thd->wsrep_next_trx_id()); + WSREP_DEBUG("assigned new next trx ID for SP, trx id: %" PRIu64, thd->wsrep_next_trx_id()); } #endif /* WITH_WSREP */ err_status= i->execute(thd, &ip); diff --git a/sql/spatial.cc b/sql/spatial.cc index a8a70d0763b..3514a519db7 100644 --- a/sql/spatial.cc +++ b/sql/spatial.cc @@ -238,17 +238,17 @@ int Geometry::as_wkt(String *wkt, const char **end) static const uchar type_keyname[]= "type"; -static const int type_keyname_len= 4; +static const uint type_keyname_len= 4; static const uchar coord_keyname[]= "coordinates"; -static const int coord_keyname_len= 11; +static const uint coord_keyname_len= 11; static const uchar geometries_keyname[]= "geometries"; -static const int geometries_keyname_len= 10; +static const uint geometries_keyname_len= 10; static const uchar features_keyname[]= "features"; -static const int features_keyname_len= 8; +static const uint features_keyname_len= 8; static const uchar geometry_keyname[]= "geometry"; -static const int geometry_keyname_len= 8; +static const uint geometry_keyname_len= 8; -static const int max_keyname_len= 11; /*'coordinates' keyname is the longest.*/ +static const uint max_keyname_len= 11; /*'coordinates' keyname is the longest.*/ static const uchar feature_type[]= "feature"; static const int feature_type_len= 7; diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc index 1da345dfbf4..ed48d65fffc 100644 --- a/sql/sql_admin.cc +++ b/sql/sql_admin.cc @@ -566,7 +566,8 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables, if (!table->table->part_info) { my_error(ER_PARTITION_MGMT_ON_NONPARTITIONED, MYF(0)); - goto err2; + thd->resume_subsequent_commits(suspended_wfc); + DBUG_RETURN(TRUE); } if (set_part_state(alter_info, table->table->part_info, PART_ADMIN)) { @@ -1219,9 +1220,6 @@ err: } close_thread_tables(thd); // Shouldn't be needed thd->mdl_context.release_transactional_locks(); -#ifdef WITH_PARTITION_STORAGE_ENGINE -err2: -#endif thd->resume_subsequent_commits(suspended_wfc); DBUG_RETURN(TRUE); } diff --git a/sql/sql_class.cc b/sql/sql_class.cc index d6196d8edbe..92e0796da76 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -5556,7 +5556,7 @@ void THD::set_query_and_id(char *query_arg, uint32 query_length_arg, query_id= new_query_id; #ifdef WITH_WSREP set_wsrep_next_trx_id(query_id); - WSREP_DEBUG("assigned new next query and trx id: %lu", wsrep_next_trx_id()); + WSREP_DEBUG("assigned new next query and trx id: %" PRIu64, wsrep_next_trx_id()); #endif /* WITH_WSREP */ } @@ -6158,16 +6158,18 @@ int THD::decide_logging_format(TABLE_LIST *tables) replicated_tables_count++; - if (table->lock_type <= TL_READ_NO_INSERT && - table->prelocking_placeholder != TABLE_LIST::PRELOCK_FK) - has_read_tables= true; - else if (table->table->found_next_number_field && - (table->lock_type >= TL_WRITE_ALLOW_WRITE)) + if (table->prelocking_placeholder != TABLE_LIST::PRELOCK_FK) { - has_auto_increment_write_tables= true; - has_auto_increment_write_tables_not_first= found_first_not_own_table; - if (table->table->s->next_number_keypart != 0) - has_write_table_auto_increment_not_first_in_pk= true; + if (table->lock_type <= TL_READ_NO_INSERT) + has_read_tables= true; + else if (table->table->found_next_number_field && + (table->lock_type >= TL_WRITE_ALLOW_WRITE)) + { + has_auto_increment_write_tables= true; + has_auto_increment_write_tables_not_first= found_first_not_own_table; + if (table->table->s->next_number_keypart != 0) + has_write_table_auto_increment_not_first_in_pk= true; + } } if (table->lock_type >= TL_WRITE_ALLOW_WRITE) diff --git a/sql/sql_class.h b/sql/sql_class.h index ba4bb45c5ae..25a9ca8e935 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -64,6 +64,7 @@ void set_thd_stage_info(void *thd, #include "wsrep_mysqld.h" #ifdef WITH_WSREP +#include <inttypes.h> /* wsrep-lib */ #include "wsrep_client_service.h" #include "wsrep_client_state.h" @@ -4550,7 +4551,7 @@ public: if (WSREP(this)) { set_wsrep_next_trx_id(query_id); - WSREP_DEBUG("assigned new next trx id: %lu", wsrep_next_trx_id()); + WSREP_DEBUG("assigned new next trx id: %" PRIu64, wsrep_next_trx_id()); } #endif /* WITH_WSREP */ } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 6e7b1d07073..831c2954e20 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1600,7 +1600,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, if (WSREP(thd) && thd->wsrep_next_trx_id() == WSREP_UNDEFINED_TRX_ID) { thd->set_wsrep_next_trx_id(thd->query_id); - WSREP_DEBUG("assigned new next trx id: %lu", thd->wsrep_next_trx_id()); + WSREP_DEBUG("assigned new next trx id: %" PRIu64, thd->wsrep_next_trx_id()); } #endif /* WITH_WSREP */ diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index 6b530a95efb..746a030a7ab 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -341,7 +341,15 @@ static bool set_up_field_array(THD *thd, TABLE *table, while ((field= *(ptr++))) { if (field->flags & GET_FIXED_FIELDS_FLAG) + { + if (table->versioned(VERS_TRX_ID) + && unlikely(field->flags & VERS_SYSTEM_FIELD)) + { + my_error(ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED, MYF(0)); + DBUG_RETURN(TRUE); + } num_fields++; + } } if (unlikely(num_fields > MAX_REF_PARTS)) { diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc index a9b6ba222f9..944fa5dc176 100644 --- a/sql/sql_statistics.cc +++ b/sql/sql_statistics.cc @@ -1057,7 +1057,9 @@ public: else { table_field->collected_stats->min_value->val_str(&val); - stat_field->store(val.ptr(), val.length(), &my_charset_bin); + size_t length= Well_formed_prefix(val.charset(), val.ptr(), + MY_MIN(val.length(), stat_field->field_length)).length(); + stat_field->store(val.ptr(), length, &my_charset_bin); } break; case COLUMN_STAT_MAX_VALUE: @@ -1066,7 +1068,9 @@ public: else { table_field->collected_stats->max_value->val_str(&val); - stat_field->store(val.ptr(), val.length(), &my_charset_bin); + size_t length= Well_formed_prefix(val.charset(), val.ptr(), + MY_MIN(val.length(), stat_field->field_length)).length(); + stat_field->store(val.ptr(), length, &my_charset_bin); } break; case COLUMN_STAT_NULLS_RATIO: @@ -3133,7 +3137,7 @@ int read_statistics_for_table(THD *thd, TABLE *table, TABLE_LIST *stat_tables) } } } - + table->stats_is_read= TRUE; DBUG_RETURN(0); diff --git a/sql/sql_table.cc b/sql/sql_table.cc index ad62ecc1103..378e04c2fac 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -8268,11 +8268,6 @@ mysql_prepare_alter_table(THD *thd, TABLE *table, } if (alter) { - if (def->real_field_type() == MYSQL_TYPE_BLOB) - { - my_error(ER_BLOB_CANT_HAVE_DEFAULT, MYF(0), def->change.str); - goto err; - } if ((def->default_value= alter->default_value)) // Use new default def->flags&= ~NO_DEFAULT_VALUE_FLAG; else diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 30578405c21..54e13d860a9 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -1028,6 +1028,7 @@ update_begin: if (table->versioned(VERS_TIMESTAMP)) { store_record(table, record[2]); + table->mark_columns_per_binlog_row_image(); error= vers_insert_history_row(table); restore_record(table, record[2]); } diff --git a/sql/table.cc b/sql/table.cc index b86298ef49d..e1f6f1a191b 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -2087,7 +2087,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write, DBUG_PRINT("info", ("Columns with system versioning: [%d, %d]", vers.start_fieldno, vers.end_fieldno)); versioned= VERS_TIMESTAMP; - vers_can_native= plugin_hton(se_plugin)->flags & HTON_NATIVE_SYS_VERSIONING; + vers_can_native= handler_file->vers_can_native(thd); status_var_increment(thd->status_var.feature_system_versioning); } // if (system_period == NULL) @@ -9149,7 +9149,10 @@ bool TR_table::query(ulonglong trx_id) return false; select= make_select(table, 0, 0, conds, NULL, 0, &error); if (unlikely(error || !select)) + { + my_error(ER_OUT_OF_RESOURCES, MYF(0)); return false; + } // FIXME: (performance) force index 'transaction_id' error= init_read_record(&info, thd, table, select, NULL, 1 /* use_record_cache */, true /* print_error */, @@ -9159,6 +9162,7 @@ bool TR_table::query(ulonglong trx_id) if (select->skip_record(thd) > 0) return true; } + my_error(ER_VERS_NO_TRX_ID, MYF(0), (longlong) trx_id); return false; } diff --git a/sql/winservice.c b/sql/winservice.c index 388ea886cea..5e021c0e297 100644 --- a/sql/winservice.c +++ b/sql/winservice.c @@ -108,7 +108,7 @@ BOOL exclude_service(mysqld_service_properties *props) } if ((props->version_major == 0) || (props->version_major > 5 && props->version_major < 10) || - (props->version_major == 5 && props->version_minor > 6)) + (props->version_major == 5 && props->version_minor > 7)) { return TRUE; } |