mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-16288 ALTER TABLE…ALGORITHM=DEFAULT does not override alter_algorithm
- ALTER_ALGORITHM should be substituted when there is no mention of algorithm in alter statement. - Introduced algorithm(thd) in Alter_info. It returns the user requested algorithm. If user doesn't specify algorithm explicitly then it returns alter_algorithm variable. - changed algorithm() to get_algorithm(thd) to return algorithm name for displaying the error. - set_requested_algorithm(algo_value) to avoid direct assignment on requested_algorithm variable. - Avoid direct access of requested_algorithm to encapsulate requested_algorithm variable
This commit is contained in:
@ -6008,7 +6008,7 @@ the generated partition syntax in a correct manner.
|
||||
*/
|
||||
if (alter_info->partition_flags != ALTER_PARTITION_INFO ||
|
||||
!table->part_info ||
|
||||
alter_info->requested_algorithm !=
|
||||
alter_info->algorithm(thd) !=
|
||||
Alter_info::ALTER_TABLE_ALGORITHM_INPLACE ||
|
||||
!table->part_info->has_same_partitioning(part_info))
|
||||
{
|
||||
|
Reference in New Issue
Block a user