Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
75f5cc47
Commit
75f5cc47
authored
Jun 12, 2023
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-30905 Remove old_alter_table variable
parent
98de1172
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
17 additions
and
265 deletions
+17
-265
mysql-test/main/alter_table.result
mysql-test/main/alter_table.result
+3
-7
mysql-test/main/alter_table.test
mysql-test/main/alter_table.test
+3
-3
mysql-test/main/innodb_mysql_sync.result
mysql-test/main/innodb_mysql_sync.result
+3
-8
mysql-test/main/innodb_mysql_sync.test
mysql-test/main/innodb_mysql_sync.test
+3
-7
mysql-test/main/mysqld--help.result
mysql-test/main/mysqld--help.result
+0
-5
mysql-test/suite/innodb/r/innodb_bug53592.result
mysql-test/suite/innodb/r/innodb_bug53592.result
+2
-6
mysql-test/suite/innodb/t/innodb_bug53592.test
mysql-test/suite/innodb/t/innodb_bug53592.test
+3
-3
mysql-test/suite/sys_vars/r/old_alter_table_basic.result
mysql-test/suite/sys_vars/r/old_alter_table_basic.result
+0
-130
mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
+0
-10
mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
...l-test/suite/sys_vars/r/sysvars_server_notembedded.result
+0
-10
mysql-test/suite/sys_vars/t/old_alter_table_basic.test
mysql-test/suite/sys_vars/t/old_alter_table_basic.test
+0
-68
sql/sys_vars.cc
sql/sys_vars.cc
+0
-8
No files found.
mysql-test/main/alter_table.result
View file @
75f5cc47
...
...
@@ -1650,12 +1650,10 @@ ALTER TABLE m1 ENABLE KEYS, ALGORITHM= INPLACE;
affected rows: 0
ALTER TABLE t1 DROP INDEX i1, DROP INDEX i2, DROP INDEX i3, DROP INDEX i4;
#
# 2: Test ALGORITHM +
old_alter_table
# 2: Test ALGORITHM +
alter_algorithm
#
SET SESSION
old_alter_table
= 1;
SET SESSION
alter_algorithm
= 1;
affected rows: 0
Warnings:
Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
ALTER TABLE t1 ADD INDEX i1(b);
affected rows: 2
info: Records: 2 Duplicates: 0 Warnings: 0
...
...
@@ -1674,10 +1672,8 @@ affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 1
Warnings:
Note 1831 Duplicate index `i4`. This is deprecated and will be disallowed in a future release
SET SESSION
old_alter_table
= 0;
SET SESSION
alter_algorithm
= 0;
affected rows: 0
Warnings:
Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
ALTER TABLE t1 DROP INDEX i1, DROP INDEX i2, DROP INDEX i3, DROP INDEX i4;
#
# 3: Test unsupported in-place operation
...
...
mysql-test/main/alter_table.test
View file @
75f5cc47
...
...
@@ -1462,16 +1462,16 @@ ALTER TABLE m1 ENABLE KEYS, ALGORITHM= INPLACE;
ALTER
TABLE
t1
DROP
INDEX
i1
,
DROP
INDEX
i2
,
DROP
INDEX
i3
,
DROP
INDEX
i4
;
--
echo
#
--
echo
# 2: Test ALGORITHM +
old_alter_table
--
echo
# 2: Test ALGORITHM +
alter_algorithm
--
echo
#
--
enable_info
SET
SESSION
old_alter_table
=
1
;
SET
SESSION
alter_algorithm
=
1
;
ALTER
TABLE
t1
ADD
INDEX
i1
(
b
);
ALTER
TABLE
t1
ADD
INDEX
i2
(
b
),
ALGORITHM
=
DEFAULT
;
ALTER
TABLE
t1
ADD
INDEX
i3
(
b
),
ALGORITHM
=
COPY
;
ALTER
TABLE
t1
ADD
INDEX
i4
(
b
),
ALGORITHM
=
INPLACE
;
SET
SESSION
old_alter_table
=
0
;
SET
SESSION
alter_algorithm
=
0
;
--
disable_info
ALTER
TABLE
t1
DROP
INDEX
i1
,
DROP
INDEX
i2
,
DROP
INDEX
i3
,
DROP
INDEX
i4
;
...
...
mysql-test/main/innodb_mysql_sync.result
View file @
75f5cc47
...
...
@@ -2,7 +2,6 @@
# Bug 42074 concurrent optimize table and
# alter table = Assertion failed: thd->is_error()
#
DROP TABLE IF EXISTS t1;
# Create InnoDB table
CREATE TABLE t1 (id INT) engine=innodb;
connect con2, localhost, root;
...
...
@@ -451,11 +450,9 @@ ALTER TABLE t1 ENGINE=INNODB;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
#ALTER TABLE FORCE, ALTER TABLE ENGINE and OPTIMIZE TABLE uses
#table copy when the
old_alter_table
enabled.
SET SESSION
old_alter_table
= TRUE;
#table copy when the
alter_algorithm
enabled.
SET SESSION
alter_algorithm
= TRUE;
affected rows: 0
Warnings:
Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
ALTER TABLE t1 FORCE;
affected rows: 1
info: Records: 1 Duplicates: 0 Warnings: 0
...
...
@@ -478,10 +475,8 @@ test.t1 optimize status OK
affected rows: 2
SET DEBUG_SYNC= 'RESET';
affected rows: 0
SET SESSION
old_alter_table
= FALSE;
SET SESSION
alter_algorithm
= FALSE;
affected rows: 0
Warnings:
Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
#ALTER TABLE FORCE and ALTER TABLE ENGINE uses table copy
#when ALGORITHM COPY is used.
ALTER TABLE t1 FORCE, ALGORITHM= COPY;
...
...
mysql-test/main/innodb_mysql_sync.test
View file @
75f5cc47
...
...
@@ -14,10 +14,6 @@
--
echo
# alter table = Assertion failed: thd->is_error()
--
echo
#
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
;
--
enable_warnings
--
echo
# Create InnoDB table
CREATE
TABLE
t1
(
id
INT
)
engine
=
innodb
;
connect
(
con2
,
localhost
,
root
);
...
...
@@ -616,8 +612,8 @@ ALTER TABLE t1 FORCE;
ALTER
TABLE
t1
ENGINE
=
INNODB
;
--
echo
#ALTER TABLE FORCE, ALTER TABLE ENGINE and OPTIMIZE TABLE uses
--
echo
#table copy when the
old_alter_table
enabled.
SET
SESSION
old_alter_table
=
TRUE
;
--
echo
#table copy when the
alter_algorithm
enabled.
SET
SESSION
alter_algorithm
=
TRUE
;
ALTER
TABLE
t1
FORCE
;
ALTER
TABLE
t1
ENGINE
=
INNODB
;
...
...
@@ -632,7 +628,7 @@ INSERT INTO t1 VALUES(10, 20);
--
connection
default
--
reap
SET
DEBUG_SYNC
=
'RESET'
;
SET
SESSION
old_alter_table
=
FALSE
;
SET
SESSION
alter_algorithm
=
FALSE
;
--
echo
#ALTER TABLE FORCE and ALTER TABLE ENGINE uses table copy
--
echo
#when ALGORITHM COPY is used.
...
...
mysql-test/main/mysqld--help.result
View file @
75f5cc47
...
...
@@ -700,10 +700,6 @@ The following specify which files/extra groups are read (specified before remain
connection before aborting the write
--old Use compatible behavior from previous MariaDB version.
See also --old-mode
--old-alter-table[=name]
Alias for alter_algorithm. Deprecated. Use
--alter-algorithm instead.. One of: DEFAULT, COPY,
INPLACE, NOCOPY, INSTANT
--old-mode=name Used to emulate old behavior from earlier MariaDB or
MySQL versions. Any combination of:
NO_DUP_KEY_WARNINGS_WITH_IGNORE, NO_PROGRESS_INFO,
...
...
@@ -1740,7 +1736,6 @@ net-read-timeout 30
net-retry-count 10
net-write-timeout 60
old FALSE
old-alter-table DEFAULT
old-mode UTF8_IS_UTF8MB3
old-passwords FALSE
old-style-user-limits FALSE
...
...
mysql-test/suite/innodb/r/innodb_bug53592.result
View file @
75f5cc47
set old_alter_table=0;
Warnings:
Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
set alter_algorithm=0;
create table bug53592(a int) engine=innodb row_format=compact;
alter table bug53592 add column b text charset utf8;
alter table bug53592 add column c blob not null;
...
...
@@ -14,9 +12,7 @@ check table bug53592;
Table Op Msg_type Msg_text
test.bug53592 check status OK
drop table bug53592;
set old_alter_table=1;
Warnings:
Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
set alter_algorithm=1;
create table bug53592(a int) engine=innodb row_format=compact;
alter table bug53592 add column b text charset utf8;
alter table bug53592 add column c blob not null;
...
...
mysql-test/suite/innodb/t/innodb_bug53592.test
View file @
75f5cc47
...
...
@@ -5,7 +5,7 @@
--
source
include
/
have_innodb
.
inc
# Use FIC for index creation
set
old_alter_table
=
0
;
set
alter_algorithm
=
0
;
create
table
bug53592
(
a
int
)
engine
=
innodb
row_format
=
compact
;
...
...
@@ -33,8 +33,8 @@ check table bug53592;
drop
table
bug53592
;
# Running the same set of test when "
old_alter_table
" is turned on
set
old_alter_table
=
1
;
# Running the same set of test when "
alter_algorithm
" is turned on
set
alter_algorithm
=
1
;
create
table
bug53592
(
a
int
)
engine
=
innodb
row_format
=
compact
;
...
...
mysql-test/suite/sys_vars/r/old_alter_table_basic.result
deleted
100644 → 0
View file @
98de1172
SET @start_global_value = @@global.old_alter_table;
SELECT @start_global_value;
@start_global_value
DEFAULT
select @@global.old_alter_table;
@@global.old_alter_table
DEFAULT
select @@session.old_alter_table;
@@session.old_alter_table
DEFAULT
show global variables like 'old_alter_table';
Variable_name Value
old_alter_table DEFAULT
show session variables like 'old_alter_table';
Variable_name Value
old_alter_table DEFAULT
select * from information_schema.global_variables where variable_name='old_alter_table';
VARIABLE_NAME VARIABLE_VALUE
OLD_ALTER_TABLE DEFAULT
select * from information_schema.session_variables where variable_name='old_alter_table';
VARIABLE_NAME VARIABLE_VALUE
OLD_ALTER_TABLE DEFAULT
set global old_alter_table=1;
Warnings:
Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
set session old_alter_table=1;
Warnings:
Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
select @@global.old_alter_table;
@@global.old_alter_table
COPY
select @@session.old_alter_table;
@@session.old_alter_table
COPY
show global variables like 'old_alter_table';
Variable_name Value
old_alter_table COPY
show session variables like 'old_alter_table';
Variable_name Value
old_alter_table COPY
select * from information_schema.global_variables where variable_name='old_alter_table';
VARIABLE_NAME VARIABLE_VALUE
OLD_ALTER_TABLE COPY
select * from information_schema.session_variables where variable_name='old_alter_table';
VARIABLE_NAME VARIABLE_VALUE
OLD_ALTER_TABLE COPY
set global old_alter_table=2;
Warnings:
Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
set session old_alter_table=2;
Warnings:
Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
select @@global.old_alter_table;
@@global.old_alter_table
INPLACE
select @@session.old_alter_table;
@@session.old_alter_table
INPLACE
show global variables like 'old_alter_table';
Variable_name Value
old_alter_table INPLACE
show session variables like 'old_alter_table';
Variable_name Value
old_alter_table INPLACE
select * from information_schema.global_variables where variable_name='old_alter_table';
VARIABLE_NAME VARIABLE_VALUE
OLD_ALTER_TABLE INPLACE
select * from information_schema.session_variables where variable_name='old_alter_table';
VARIABLE_NAME VARIABLE_VALUE
OLD_ALTER_TABLE INPLACE
set global old_alter_table=3;
Warnings:
Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
set session old_alter_table=3;
Warnings:
Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
select @@global.old_alter_table;
@@global.old_alter_table
NOCOPY
select @@session.old_alter_table;
@@session.old_alter_table
NOCOPY
show global variables like 'old_alter_table';
Variable_name Value
old_alter_table NOCOPY
show session variables like 'old_alter_table';
Variable_name Value
old_alter_table NOCOPY
select * from information_schema.global_variables where variable_name='old_alter_table';
VARIABLE_NAME VARIABLE_VALUE
OLD_ALTER_TABLE NOCOPY
select * from information_schema.session_variables where variable_name='old_alter_table';
VARIABLE_NAME VARIABLE_VALUE
OLD_ALTER_TABLE NOCOPY
set global old_alter_table=4;
Warnings:
Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
set session old_alter_table=4;
Warnings:
Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
select @@global.old_alter_table;
@@global.old_alter_table
INSTANT
select @@session.old_alter_table;
@@session.old_alter_table
INSTANT
show global variables like 'old_alter_table';
Variable_name Value
old_alter_table INSTANT
show session variables like 'old_alter_table';
Variable_name Value
old_alter_table INSTANT
select * from information_schema.global_variables where variable_name='old_alter_table';
VARIABLE_NAME VARIABLE_VALUE
OLD_ALTER_TABLE INSTANT
select * from information_schema.session_variables where variable_name='old_alter_table';
VARIABLE_NAME VARIABLE_VALUE
OLD_ALTER_TABLE INSTANT
set global old_alter_table=1.1;
ERROR 42000: Incorrect argument type to variable 'old_alter_table'
set global old_alter_table=1e1;
ERROR 42000: Incorrect argument type to variable 'old_alter_table'
set global old_alter_table="foo";
ERROR 42000: Variable 'old_alter_table' can't be set to the value of 'foo'
SET @@global.old_alter_table = @start_global_value;
Warnings:
Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
SELECT @@global.old_alter_table;
@@global.old_alter_table
DEFAULT
mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
View file @
75f5cc47
...
...
@@ -2272,16 +2272,6 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME OLD_ALTER_TABLE
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Alias for alter_algorithm. Deprecated. Use --alter-algorithm instead.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST DEFAULT,COPY,INPLACE,NOCOPY,INSTANT
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME OLD_MODE
VARIABLE_SCOPE SESSION
VARIABLE_TYPE SET
...
...
mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
View file @
75f5cc47
...
...
@@ -2472,16 +2472,6 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME OLD_ALTER_TABLE
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Alias for alter_algorithm. Deprecated. Use --alter-algorithm instead.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST DEFAULT,COPY,INPLACE,NOCOPY,INSTANT
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME OLD_MODE
VARIABLE_SCOPE SESSION
VARIABLE_TYPE SET
...
...
mysql-test/suite/sys_vars/t/old_alter_table_basic.test
deleted
100644 → 0
View file @
98de1172
#
# 2010-01-20 OBN - added check of I_S values after variable value changed
#
SET
@
start_global_value
=
@@
global
.
old_alter_table
;
SELECT
@
start_global_value
;
#
# exists as global and session
#
select
@@
global
.
old_alter_table
;
select
@@
session
.
old_alter_table
;
show
global
variables
like
'old_alter_table'
;
show
session
variables
like
'old_alter_table'
;
select
*
from
information_schema
.
global_variables
where
variable_name
=
'old_alter_table'
;
select
*
from
information_schema
.
session_variables
where
variable_name
=
'old_alter_table'
;
#
# show that it's writable
#
set
global
old_alter_table
=
1
;
set
session
old_alter_table
=
1
;
select
@@
global
.
old_alter_table
;
select
@@
session
.
old_alter_table
;
show
global
variables
like
'old_alter_table'
;
show
session
variables
like
'old_alter_table'
;
select
*
from
information_schema
.
global_variables
where
variable_name
=
'old_alter_table'
;
select
*
from
information_schema
.
session_variables
where
variable_name
=
'old_alter_table'
;
set
global
old_alter_table
=
2
;
set
session
old_alter_table
=
2
;
select
@@
global
.
old_alter_table
;
select
@@
session
.
old_alter_table
;
show
global
variables
like
'old_alter_table'
;
show
session
variables
like
'old_alter_table'
;
select
*
from
information_schema
.
global_variables
where
variable_name
=
'old_alter_table'
;
select
*
from
information_schema
.
session_variables
where
variable_name
=
'old_alter_table'
;
set
global
old_alter_table
=
3
;
set
session
old_alter_table
=
3
;
select
@@
global
.
old_alter_table
;
select
@@
session
.
old_alter_table
;
show
global
variables
like
'old_alter_table'
;
show
session
variables
like
'old_alter_table'
;
select
*
from
information_schema
.
global_variables
where
variable_name
=
'old_alter_table'
;
select
*
from
information_schema
.
session_variables
where
variable_name
=
'old_alter_table'
;
set
global
old_alter_table
=
4
;
set
session
old_alter_table
=
4
;
select
@@
global
.
old_alter_table
;
select
@@
session
.
old_alter_table
;
show
global
variables
like
'old_alter_table'
;
show
session
variables
like
'old_alter_table'
;
select
*
from
information_schema
.
global_variables
where
variable_name
=
'old_alter_table'
;
select
*
from
information_schema
.
session_variables
where
variable_name
=
'old_alter_table'
;
#
# incorrect types
#
--
error
ER_WRONG_TYPE_FOR_VAR
set
global
old_alter_table
=
1.1
;
--
error
ER_WRONG_TYPE_FOR_VAR
set
global
old_alter_table
=
1
e1
;
--
error
ER_WRONG_VALUE_FOR_VAR
set
global
old_alter_table
=
"foo"
;
SET
@@
global
.
old_alter_table
=
@
start_global_value
;
SELECT
@@
global
.
old_alter_table
;
sql/sys_vars.cc
View file @
75f5cc47
...
...
@@ -2782,14 +2782,6 @@ static Sys_var_enum Sys_alter_algorithm(
SESSION_VAR
(
alter_algorithm
),
CMD_LINE
(
OPT_ARG
),
alter_algorithm_modes
,
DEFAULT
(
0
));
static
Sys_var_enum
Sys_old_alter_table
(
"old_alter_table"
,
"Alias for alter_algorithm. "
"Deprecated. Use --alter-algorithm instead."
,
SESSION_VAR
(
alter_algorithm
),
CMD_LINE
(
OPT_ARG
),
alter_algorithm_modes
,
DEFAULT
(
0
),
NO_MUTEX_GUARD
,
NOT_IN_BINLOG
,
ON_CHECK
(
0
),
ON_UPDATE
(
0
),
DEPRECATED
(
"'@@alter_algorithm'"
));
// Since 10.5.1
static
bool
check_old_passwords
(
sys_var
*
self
,
THD
*
thd
,
set_var
*
var
)
{
return
mysql_user_table_is_in_short_password_format
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment