diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-07-27 17:17:24 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-07-27 17:17:24 +0300 |
commit | 098c0f2634a35e24e9eb0f06d3fba69d0d097657 (patch) | |
tree | 8e6b460d1c8812d29444bf1bd7449e5871105215 /sql/sql_sequence.cc | |
parent | 5bf4dee36943cb4cc95d10863d469192de854800 (diff) | |
parent | e5c4f4e590d7782ef938b436f84ae11b68e0af08 (diff) | |
download | mariadb-git-098c0f2634a35e24e9eb0f06d3fba69d0d097657.tar.gz |
Merge 10.4 into 10.5
Diffstat (limited to 'sql/sql_sequence.cc')
-rw-r--r-- | sql/sql_sequence.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/sql_sequence.cc b/sql/sql_sequence.cc index 07571c3bbac..11b5109c349 100644 --- a/sql/sql_sequence.cc +++ b/sql/sql_sequence.cc @@ -706,7 +706,9 @@ longlong SEQUENCE::next_value(TABLE *table, bool second_round, int *error) { longlong res_value, org_reserved_until, add_to; bool out_of_values; + THD *thd= table->in_use; DBUG_ENTER("SEQUENCE::next_value"); + DBUG_ASSERT(thd); *error= 0; if (!second_round) @@ -771,7 +773,8 @@ longlong SEQUENCE::next_value(TABLE *table, bool second_round, int *error) DBUG_RETURN(next_value(table, 1, error)); } - if (unlikely((*error= write(table, 0)))) + if (unlikely((*error= write(table, thd->variables.binlog_row_image != + BINLOG_ROW_IMAGE_MINIMAL)))) { reserved_until= org_reserved_until; next_free_value= res_value; @@ -838,7 +841,9 @@ int SEQUENCE::set_value(TABLE *table, longlong next_val, ulonglong next_round, longlong org_reserved_until= reserved_until; longlong org_next_free_value= next_free_value; ulonglong org_round= round; + THD *thd= table->in_use; DBUG_ENTER("SEQUENCE::set_value"); + DBUG_ASSERT(thd); write_lock(table); if (is_used) @@ -877,7 +882,8 @@ int SEQUENCE::set_value(TABLE *table, longlong next_val, ulonglong next_round, needs_to_be_stored) { reserved_until= next_free_value; - if (write(table, 0)) + if (write(table, + thd->variables.binlog_row_image != BINLOG_ROW_IMAGE_MINIMAL)) { reserved_until= org_reserved_until; next_free_value= org_next_free_value; |