mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-29771 Server crashes in check_sequence_fields upon CREATE TABLE .. SEQUENCE=1 AS SELECT ..
Pass name separately for sequence check because sequence can be created with CREATE TABLE (see https://mariadb.com/kb/en/create-table/#sequence )
This commit is contained in:
@ -186,7 +186,8 @@ void sequence_definition::store_fields(TABLE *table)
|
||||
true Failure
|
||||
*/
|
||||
|
||||
bool check_sequence_fields(LEX *lex, List<Create_field> *fields)
|
||||
bool check_sequence_fields(LEX *lex, List<Create_field> *fields,
|
||||
const LEX_CSTRING db, const LEX_CSTRING table_name)
|
||||
{
|
||||
Create_field *field;
|
||||
List_iterator_fast<Create_field> it(*fields);
|
||||
@ -234,8 +235,7 @@ bool check_sequence_fields(LEX *lex, List<Create_field> *fields)
|
||||
|
||||
err:
|
||||
my_error(ER_SEQUENCE_INVALID_TABLE_STRUCTURE, MYF(0),
|
||||
lex->first_select_lex()->table_list.first->db.str,
|
||||
lex->first_select_lex()->table_list.first->table_name.str, reason);
|
||||
db.str, table_name.str, reason);
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user