polardbxengine/mysql-test/suite/rpl/r/rpl_explicit_undo_tablespac...

251 lines
8.8 KiB
Plaintext

include/master-slave.inc
Warnings:
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
[connection master]
[Connection Master]
CREATE UNDO TABLESPACE undo_005 ADD DATAFILE 'undo_005.ibu';
CREATE UNDO TABLESPACE undo_006 ADD DATAFILE 'undo_006.ibu';
SELECT name,space_type,state
FROM INFORMATION_SCHEMA.INNODB_TABLESPACES
WHERE space_type = 'Undo' ORDER BY name;
name space_type state
innodb_undo_001 Undo active
innodb_undo_002 Undo active
innodb_undo_003 Undo active
innodb_undo_004 Undo active
innodb_undo_005 Undo active
innodb_undo_006 Undo active
undo_005 Undo active
undo_006 Undo active
include/sync_slave_sql_with_master.inc
[Connection Slave]
SELECT name,space_type,state
FROM INFORMATION_SCHEMA.INNODB_TABLESPACES
WHERE space_type = 'Undo' ORDER BY name;
name space_type state
innodb_undo_001 Undo active
innodb_undo_002 Undo active
innodb_undo_003 Undo active
innodb_undo_004 Undo active
innodb_undo_005 Undo active
innodb_undo_006 Undo active
[Connection Master]
DROP UNDO TABLESPACE undo_005;
ERROR HY000: Failed to drop UNDO TABLESPACE undo_005
SHOW WARNINGS;
Level Code Message
Error 1529 Failed to drop UNDO TABLESPACE undo_005
Error 3120 Tablespace `undo_005` is not empty.
include/sync_slave_sql_with_master.inc
[Connection Slave]
DROP UNDO TABLESPACE undo_005;
ERROR HY000: Tablespace undo_005 doesn't exist.
SHOW WARNINGS;
Level Code Message
Error 3510 Tablespace undo_005 doesn't exist.
[Connection Master]
ALTER UNDO TABLESPACE innodb_undo_005 SET INACTIVE;
ALTER UNDO TABLESPACE innodb_undo_006 SET INACTIVE;
SELECT name,space_type,state
FROM INFORMATION_SCHEMA.INNODB_TABLESPACES
WHERE space_type = 'Undo' ORDER BY name;
name space_type state
innodb_undo_001 Undo active
innodb_undo_002 Undo active
innodb_undo_003 Undo active
innodb_undo_004 Undo active
innodb_undo_005 Undo empty
innodb_undo_006 Undo empty
undo_005 Undo active
undo_006 Undo active
include/sync_slave_sql_with_master.inc
[Connection Slave]
SELECT name,space_type,state
FROM INFORMATION_SCHEMA.INNODB_TABLESPACES
WHERE space_type = 'Undo' ORDER BY name;
name space_type state
innodb_undo_001 Undo active
innodb_undo_002 Undo active
innodb_undo_003 Undo active
innodb_undo_004 Undo active
innodb_undo_005 Undo active
innodb_undo_006 Undo active
ALTER UNDO TABLESPACE innodb_undo_005 SET INACTIVE;
ERROR HY000: Cannot set innodb_undo_005 inactive since there would be less than 2 undo tablespaces left active.
ALTER UNDO TABLESPACE innodb_undo_006 SET INACTIVE;
ERROR HY000: Cannot set innodb_undo_006 inactive since there would be less than 2 undo tablespaces left active.
SELECT name,space_type,state
FROM INFORMATION_SCHEMA.INNODB_TABLESPACES
WHERE space_type = 'Undo' ORDER BY name;
name space_type state
innodb_undo_001 Undo active
innodb_undo_002 Undo active
innodb_undo_003 Undo active
innodb_undo_004 Undo active
innodb_undo_005 Undo active
innodb_undo_006 Undo active
[Connection Master]
CREATE TABLESPACE ts1 ADD DATAFILE 'ts1.ibd' Engine=InnoDB;
CREATE TABLE tab1(c1 int, c2 varchar(10)) TABLESPACE=ts1;
INSERT INTO tab1 VALUES(1, 'VISH');
CREATE TABLE tab2(c1 int , c2 varchar(10)) Engine=InnoDB;
INSERT INTO tab2 VALUES(2, 'VISH');
CREATE INDEX ix1 ON tab1(c2) USING BTREE;
CREATE INDEX ix2 ON tab2(c2) ;
include/sync_slave_sql_with_master.inc
[Connection Slave]
SHOW CREATE TABLE tab1;
Table Create Table
tab1 CREATE TABLE `tab1` (
`c1` int(11) DEFAULT NULL,
`c2` varchar(10) DEFAULT NULL,
KEY `ix1` (`c2`) USING BTREE
) /*!50100 TABLESPACE `ts1` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
SHOW CREATE TABLE tab2;
Table Create Table
tab2 CREATE TABLE `tab2` (
`c1` int(11) DEFAULT NULL,
`c2` varchar(10) DEFAULT NULL,
KEY `ix2` (`c2`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
SELECT * FROM tab1;
c1 c2
1 VISH
SELECT * FROM tab2;
c1 c2
2 VISH
[Connection Master]
ALTER UNDO TABLESPACE undo_005 SET INACTIVE;
ERROR HY000: Cannot set undo_005 inactive since there would be less than 2 undo tablespaces left active.
SHOW WARNINGS;
Level Code Message
Error 3655 Cannot set undo_005 inactive since there would be less than 2 undo tablespaces left active.
Error 1533 Failed to alter: UNDO TABLESPACE undo_005
Error 3655 ALTER UNDO TABLEPSPACE operation is disallowed on undo_005
ALTER UNDO TABLESPACE undo_006 SET INACTIVE;
ERROR HY000: Cannot set undo_006 inactive since there would be less than 2 undo tablespaces left active.
SHOW WARNINGS;
Level Code Message
Error 3655 Cannot set undo_006 inactive since there would be less than 2 undo tablespaces left active.
Error 1533 Failed to alter: UNDO TABLESPACE undo_006
Error 3655 ALTER UNDO TABLEPSPACE operation is disallowed on undo_006
DROP UNDO TABLESPACE innodb_undo_005;
ERROR 42000: InnoDB: Tablespace names starting with `innodb_` are reserved.
SELECT name,space_type,state
FROM INFORMATION_SCHEMA.INNODB_TABLESPACES
WHERE space_type = 'Undo' ORDER BY name;
name space_type state
innodb_undo_001 Undo active
innodb_undo_002 Undo active
innodb_undo_003 Undo active
innodb_undo_004 Undo active
innodb_undo_005 Undo empty
innodb_undo_006 Undo empty
undo_005 Undo active
undo_006 Undo active
include/sync_slave_sql_with_master.inc
[Connection Slave]
ALTER UNDO TABLESPACE undo_006 SET INACTIVE;
ERROR HY000: Tablespace undo_006 doesn't exist.
SHOW WARNINGS;
Level Code Message
Error 3510 Tablespace undo_006 doesn't exist.
SELECT name,space_type,state
FROM INFORMATION_SCHEMA.INNODB_TABLESPACES
WHERE space_type = 'Undo' ORDER BY name;
name space_type state
innodb_undo_001 Undo active
innodb_undo_002 Undo active
innodb_undo_003 Undo active
innodb_undo_004 Undo active
innodb_undo_005 Undo active
innodb_undo_006 Undo active
DROP UNDO TABLESPACE innodb_undo_001;
ERROR 42000: InnoDB: Tablespace names starting with `innodb_` are reserved.
[Connection Master]
ALTER UNDO TABLESPACE innodb_undo_005 SET ACTIVE;
ALTER UNDO TABLESPACE innodb_undo_006 SET ACTIVE;
SELECT name,space_type,state
FROM INFORMATION_SCHEMA.INNODB_TABLESPACES
WHERE space_type = 'Undo' ORDER BY name;
name space_type state
innodb_undo_001 Undo active
innodb_undo_002 Undo active
innodb_undo_003 Undo active
innodb_undo_004 Undo active
innodb_undo_005 Undo active
innodb_undo_006 Undo active
undo_005 Undo active
undo_006 Undo active
DROP TABLE tab1;
DROP table tab2;
DROP TABLESPACE ts1;
ALTER UNDO TABLESPACE undo_005 SET INACTIVE;
ALTER UNDO TABLESPACE undo_006 SET INACTIVE;
DROP UNDO TABLESPACE undo_005;
SELECT name,space_type,state
FROM INFORMATION_SCHEMA.INNODB_TABLESPACES
WHERE space_type = 'Undo';
name space_type state
innodb_undo_001 Undo active
innodb_undo_002 Undo active
innodb_undo_003 Undo active
innodb_undo_004 Undo active
innodb_undo_005 Undo active
innodb_undo_006 Undo active
undo_006 Undo empty
CREATE UNDO TABLESPACE undo_005 ADD DATAFILE '../undo_005.ibu';
ERROR HY000: The ADD DATAFILE filepath for an UNDO TABLESPACE cannot be a relative path.
SHOW WARNINGS;
Level Code Message
Error 3121 The ADD DATAFILE filepath for an UNDO TABLESPACE cannot be a relative path.
Error 3121 CREATE UNDO TABLESPACE data file must be in one of these directories './'.
Error 1528 Failed to create UNDO TABLESPACE undo_005
Error 3121 Incorrect File Name '../undo_005.ibu'.
include/sync_slave_sql_with_master.inc
[Connection Slave]
SELECT name,space_type,state
FROM INFORMATION_SCHEMA.INNODB_TABLESPACES
WHERE space_type = 'Undo';
name space_type state
innodb_undo_001 Undo active
innodb_undo_002 Undo active
innodb_undo_003 Undo active
innodb_undo_004 Undo active
innodb_undo_005 Undo active
innodb_undo_006 Undo active
CREATE UNDO TABLESPACE undo_005 ADD DATAFILE '../undo_005.ibu';
ERROR HY000: The ADD DATAFILE filepath for an UNDO TABLESPACE cannot be a relative path.
SHOW WARNINGS;
Level Code Message
Error 3121 The ADD DATAFILE filepath for an UNDO TABLESPACE cannot be a relative path.
Error 3121 CREATE UNDO TABLESPACE data file must be in one of these directories './'.
Error 1528 Failed to create UNDO TABLESPACE undo_005
Error 3121 Incorrect File Name '../undo_005.ibu'.
[Connection Master]
DROP UNDO TABLESPACE undo_006;
SELECT name,space_type,state
FROM INFORMATION_SCHEMA.INNODB_TABLESPACES
WHERE space_type = 'Undo';
name space_type state
innodb_undo_001 Undo active
innodb_undo_002 Undo active
innodb_undo_003 Undo active
innodb_undo_004 Undo active
innodb_undo_005 Undo active
innodb_undo_006 Undo active
include/sync_slave_sql_with_master.inc
[Connection Slave]
SELECT name,space_type,state
FROM INFORMATION_SCHEMA.INNODB_TABLESPACES
WHERE space_type = 'Undo';
name space_type state
innodb_undo_001 Undo active
innodb_undo_002 Undo active
innodb_undo_003 Undo active
innodb_undo_004 Undo active
innodb_undo_005 Undo active
innodb_undo_006 Undo active
include/rpl_end.inc