mirror of
https://github.com/MariaDB/server.git
synced 2025-07-07 06:01:31 +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:
@ -41,6 +41,9 @@ info: Records: 1 Duplicates: 0 Warnings: 0
|
||||
ALTER TABLE t1 ENGINE=INNODB;
|
||||
affected rows: 1
|
||||
info: Records: 1 Duplicates: 0 Warnings: 0
|
||||
ALTER TABLE t1 FORCE, ALGORITHM=DEFAULT;
|
||||
affected rows: 1
|
||||
info: Records: 1 Duplicates: 0 Warnings: 0
|
||||
DROP TABLE t1;
|
||||
affected rows: 0
|
||||
CREATE TABLE t1(f1 INT PRIMARY KEY, f2 INT NOT NULL,
|
||||
@ -97,7 +100,8 @@ affected rows: 1
|
||||
info: Records: 1 Duplicates: 0 Warnings: 0
|
||||
# Rename table
|
||||
ALTER TABLE t1 RENAME t3;
|
||||
affected rows: 0
|
||||
affected rows: 1
|
||||
info: Records: 1 Duplicates: 0 Warnings: 0
|
||||
# Drop Virtual Column
|
||||
ALTER TABLE t3 DROP COLUMN vcol;
|
||||
affected rows: 1
|
||||
|
Reference in New Issue
Block a user