ERROR 42000: Row size too large (> {checked_valid}). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
SET innodb_strict_mode=OFF;
DROP TABLE IF EXISTS t1;
Warnings:
Note 1051 Unknown table 'test.t1'
CREATE TABLE t1(
id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY
) ENGINE=InnoDB;
INSERT INTO t1 VALUES(-10);
SELECT * FROM t1;
id
-10
INSERT INTO t1 VALUES(NULL);
SELECT * FROM t1;
id
-10
1
DROP TABLE t1;
CONNECT c1,localhost,root,,;
CONNECT c2,localhost,root,,;
connection c1;
SET binlog_format='MIXED';
SET TX_ISOLATION='read-committed';
SET AUTOCOMMIT=0;
DROP TABLE IF EXISTS t1, t2;
Warnings:
Note 1051 Unknown table 'test.t1'
Note 1051 Unknown table 'test.t2'
CREATE TABLE t1 ( a int ) ENGINE=InnoDB;
CREATE TABLE t2 LIKE t1;
SELECT * FROM t2;
a
connection c2;
SET binlog_format='MIXED';
SET TX_ISOLATION='read-committed';
SET AUTOCOMMIT=0;
INSERT INTO t1 VALUES (1);
COMMIT;
connection c1;
SELECT * FROM t1 WHERE a=1;
a
1
disconnect c1;
disconnect c2;
CONNECT c1,localhost,root,,;
CONNECT c2,localhost,root,,;
connection c1;
SET binlog_format='MIXED';
SET TX_ISOLATION='read-committed';
SET AUTOCOMMIT=0;
SELECT * FROM t2;
a
connection c2;
SET binlog_format='MIXED';
SET TX_ISOLATION='read-committed';
SET AUTOCOMMIT=0;
INSERT INTO t1 VALUES (2);
COMMIT;
connection c1;
SELECT * FROM t1 WHERE a=2;
a
2
SELECT * FROM t1 WHERE a=2;
a
2
DROP TABLE t1;
DROP TABLE t2;
disconnect c1;
disconnect c2;
connection default;
create table t1 (i int, j int) engine=innodb;
insert into t1 (i, j) values (1, 1), (2, 2);
update t1 set j = 2;
affected rows: 1
info: Rows matched: 2 Changed: 1 Warnings: 0
drop table t1;
set @save_innodb_file_per_table= @@global.innodb_file_per_table;
set @@global.innodb_file_per_table=0;
create table t1 (id int) comment='this is a comment' engine=innodb;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
select table_comment, data_free > 0 as data_free_is_set
from information_schema.tables
where table_schema='test' and table_name = 't1';
table_comment data_free_is_set
this is a comment 1
drop table t1;
set @@global.innodb_file_per_table= @save_innodb_file_per_table;