1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-33169 Reset sequence used fields after check in alter sequence

The bitmap is temporarily flipped to ~0 for the sake of checking all
fields. It needs to be restored because it will be reused in second
and subsequent ps execution.
This commit is contained in:
Yuchen Pei
2024-01-05 09:35:57 +11:00
parent f7573e7a83
commit ca276a0f3f
3 changed files with 86 additions and 0 deletions

View File

@ -924,6 +924,7 @@ bool Sql_cmd_alter_sequence::execute(THD *thd)
TABLE_LIST *first_table= lex->query_tables;
TABLE *table;
sequence_definition *new_seq= lex->create_info.seq_create_info;
uint saved_used_fields= new_seq->used_fields;
SEQUENCE *seq;
No_such_table_error_handler no_such_table_handler;
DBUG_ENTER("Sql_cmd_alter_sequence::execute");
@ -1043,5 +1044,6 @@ bool Sql_cmd_alter_sequence::execute(THD *thd)
my_ok(thd);
end:
new_seq->used_fields= saved_used_fields;
DBUG_RETURN(error);
}