ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs
DROP TABLE IF EXISTS t1;
Warnings:
Note 1051 Unknown table '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;
SET binlog_format='MIXED';
SET TX_ISOLATION='read-committed';
SET AUTOCOMMIT=0;
DROP TABLE IF EXISTS t1, t2;
Warnings:
Note 1051 Unknown table 't1'
Note 1051 Unknown table 't2'
CREATE TABLE t1 ( a int ) ENGINE=InnoDB;
CREATE TABLE t2 LIKE t1;
SELECT * FROM t2;
a
SET binlog_format='MIXED';
SET TX_ISOLATION='read-committed';
SET AUTOCOMMIT=0;
INSERT INTO t1 VALUES (1);
COMMIT;
SELECT * FROM t1 WHERE a=1;
a
1
SET binlog_format='MIXED';
SET TX_ISOLATION='read-committed';
SET AUTOCOMMIT=0;
SELECT * FROM t2;
a
SET binlog_format='MIXED';
SET TX_ISOLATION='read-committed';
SET AUTOCOMMIT=0;
INSERT INTO t1 VALUES (2);
COMMIT;
SELECT * FROM t1 WHERE a=2;
a
2
SELECT * FROM t1 WHERE a=2;
a
2
DROP TABLE t1;
DROP TABLE t2;
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;
create table t1 (id int) comment='this is a comment' engine=innodb;
select table_comment, data_free > 0 as data_free_is_set
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs
DROP TABLE IF EXISTS t1;
Warnings:
Note 1051 Unknown table '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;
SET binlog_format='MIXED';
SET TX_ISOLATION='read-committed';
SET AUTOCOMMIT=0;
DROP TABLE IF EXISTS t1, t2;
Warnings:
Note 1051 Unknown table 't1'
Note 1051 Unknown table 't2'
CREATE TABLE t1 ( a int ) ENGINE=InnoDB;
CREATE TABLE t2 LIKE t1;
SELECT * FROM t2;
a
SET binlog_format='MIXED';
SET TX_ISOLATION='read-committed';
SET AUTOCOMMIT=0;
INSERT INTO t1 VALUES (1);
COMMIT;
SELECT * FROM t1 WHERE a=1;
a
1
SET binlog_format='MIXED';
SET TX_ISOLATION='read-committed';
SET AUTOCOMMIT=0;
SELECT * FROM t2;
a
SET binlog_format='MIXED';
SET TX_ISOLATION='read-committed';
SET AUTOCOMMIT=0;
INSERT INTO t1 VALUES (2);
COMMIT;
SELECT * FROM t1 WHERE a=2;
a
2
SELECT * FROM t1 WHERE a=2;
a
2
DROP TABLE t1;
DROP TABLE t2;
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;
create table t1 (id int) comment='this is a comment' engine=innodb;
select table_comment, data_free > 0 as data_free_is_set