mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge branch '10.5' into 10.6
This commit is contained in:
@ -2651,7 +2651,8 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
|
||||
select_field_pos= alter_info->create_list.elements - select_field_count;
|
||||
select_field_pos= get_select_field_pos(alter_info, select_field_count,
|
||||
create_info->versioned());
|
||||
null_fields= 0;
|
||||
create_info->varchar= 0;
|
||||
max_key_length= file->max_key_length();
|
||||
@ -2716,7 +2717,16 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
|
||||
/*
|
||||
If this was a CREATE ... SELECT statement, accept a field
|
||||
redefinition if we are changing a field in the SELECT part
|
||||
|
||||
The cases are:
|
||||
|
||||
field_no < select_field_pos: both field and dup are table fields;
|
||||
dup_no >= select_field_pos: both field and dup are select fields or
|
||||
field is implicit systrem field and dup is select field.
|
||||
|
||||
We are not allowed to put row_start/row_end into SELECT expression.
|
||||
*/
|
||||
DBUG_ASSERT(dup_no < field_no);
|
||||
if (field_no < select_field_pos || dup_no >= select_field_pos ||
|
||||
dup_field->invisible >= INVISIBLE_SYSTEM)
|
||||
{
|
||||
|
Reference in New Issue
Block a user