mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-13720 Server crashes in SEQUENCE::write_lock for temporary tables
This happens when doing NEXT VALUE for a temporary table Fixed by giving ER_NOT_SEQUENCE when trying to use normal temporary table with sequence functions Signed-off-by: Monty <monty@mariadb.org>
This commit is contained in:
@ -3341,6 +3341,11 @@ open_and_process_table(THD *thd, LEX *lex, TABLE_LIST *tables,
|
||||
temporary table or SEQUENCE (see sequence_insert()).
|
||||
*/
|
||||
DBUG_ASSERT(is_temporary_table(tables) || tables->table->s->sequence);
|
||||
if (tables->sequence && tables->table->s->table_type != TABLE_TYPE_SEQUENCE)
|
||||
{
|
||||
my_error(ER_NOT_SEQUENCE, MYF(0), tables->db, tables->alias);
|
||||
DBUG_RETURN(true);
|
||||
}
|
||||
}
|
||||
else if (tables->open_type == OT_TEMPORARY_ONLY)
|
||||
{
|
||||
|
Reference in New Issue
Block a user