mirror of
https://github.com/MariaDB/server.git
synced 2025-05-13 01:01:44 +03:00
The following options will be removed: innodb_file_format innodb_file_format_check innodb_file_format_max innodb_large_prefix They have been deprecated in MySQL 5.7.7 (and MariaDB 10.2.2) in WL#7703. The file_format column in two INFORMATION_SCHEMA tables will be removed: innodb_sys_tablespaces innodb_sys_tables Code to update the file format tag at the end of page 0:5 (TRX_SYS_PAGE in the InnoDB system tablespace) will be removed. When initializing a new database, the bytes will remain 0. All references to the Barracuda file format will be removed. Some references to the Antelope file format (meaning ROW_FORMAT=REDUNDANT or ROW_FORMAT=COMPACT) will remain. This basically ports WL#7704 from MySQL 8.0.0 to MariaDB 10.3.1: commit 4a69dc2a95995501ed92d59a1de74414a38540c6 Author: Marko Mäkelä <marko.makela@oracle.com> Date: Wed Mar 11 22:19:49 2015 +0200
60 lines
1.7 KiB
Plaintext
60 lines
1.7 KiB
Plaintext
CREATE TABLE t (c1 INT PRIMARY KEY, c2 INT NOT NULL, c3 INT) ENGINE=InnoDB;
|
|
INSERT INTO t VALUES (1,2,3),(4,5,6),(7,8,9);
|
|
ALTER TABLE t CHANGE c1 c1 INT NULL FIRST, ALGORITHM=INPLACE;
|
|
affected rows: 0
|
|
info: Records: 0 Duplicates: 0 Warnings: 0
|
|
set @old_sql_mode = @@sql_mode;
|
|
set @@sql_mode = 'STRICT_TRANS_TABLES';
|
|
ALTER TABLE t MODIFY c3 INT NOT NULL, ALGORITHM=INPLACE;
|
|
affected rows: 0
|
|
info: Records: 0 Duplicates: 0 Warnings: 0
|
|
set @@sql_mode = @old_sql_mode;
|
|
ALTER TABLE t CHANGE c2 c2 INT, CHANGE c2 c2 INT NOT NULL;
|
|
ERROR 42S22: Unknown column 'c2' in 't'
|
|
ALTER TABLE t MODIFY c2 INT, MODIFY c2 INT NOT NULL;
|
|
ERROR 42S22: Unknown column 'c2' in 't'
|
|
ALTER TABLE t MODIFY c2 INT UNSIGNED, MODIFY c2 INT;
|
|
ERROR 42S22: Unknown column 'c2' in 't'
|
|
ALTER TABLE t MODIFY c2 CHAR(1) NOT NULL, MODIFY c2 INT NOT NULL;
|
|
ERROR 42S22: Unknown column 'c2' in 't'
|
|
ALTER TABLE t CHANGE c2 c2 INT NOT NULL;
|
|
affected rows: 0
|
|
info: Records: 0 Duplicates: 0 Warnings: 0
|
|
ALTER TABLE t MODIFY c2 INT NOT NULL;
|
|
affected rows: 0
|
|
info: Records: 0 Duplicates: 0 Warnings: 0
|
|
connect con1,localhost,root,,;
|
|
connection con1;
|
|
SET SQL_MODE='STRICT_ALL_TABLES';
|
|
UPDATE t SET c2=NULL;
|
|
ERROR 23000: Column 'c2' cannot be null
|
|
SELECT * FROM t;
|
|
c1 c2 c3
|
|
1 2 3
|
|
4 5 6
|
|
7 8 9
|
|
connection default;
|
|
ALTER TABLE t MODIFY c2 INT, ALGORITHM=INPLACE;
|
|
connection con1;
|
|
BEGIN;
|
|
UPDATE t SET c2=NULL;
|
|
SELECT * FROM t;
|
|
c1 c2 c3
|
|
1 NULL 3
|
|
4 NULL 6
|
|
7 NULL 9
|
|
ROLLBACK;
|
|
SELECT * FROM t;
|
|
c1 c2 c3
|
|
1 2 3
|
|
4 5 6
|
|
7 8 9
|
|
disconnect con1;
|
|
connection default;
|
|
ALTER TABLE t MODIFY c2 INT NULL, ALGORITHM=INPLACE;
|
|
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES
|
|
WHERE NAME='test/t';
|
|
TABLE_ID NAME FLAG N_COLS SPACE ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE
|
|
# test/t 33 6 # Dynamic 0 Single
|
|
DROP TABLE t;
|