Commit 74422d61 authored by Marko Mäkelä's avatar Marko Mäkelä

Adjust tests for the Bug #50495 fix.

parent 6517c87a
...@@ -127,6 +127,12 @@ CREATE TABLE t1( ...@@ -127,6 +127,12 @@ CREATE TABLE t1(
c TEXT NOT NULL, d TEXT NOT NULL, c TEXT NOT NULL, d TEXT NOT NULL,
PRIMARY KEY (c(767),d(767))) PRIMARY KEY (c(767),d(767)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
DROP TABLE t1;
SET SESSION innodb_strict_mode = on;
CREATE TABLE t1(
c TEXT NOT NULL, d TEXT NOT NULL,
PRIMARY KEY (c(767),d(767)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
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 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
CREATE TABLE t1( CREATE TABLE t1(
c TEXT NOT NULL, d TEXT NOT NULL, c TEXT NOT NULL, d TEXT NOT NULL,
......
...@@ -85,8 +85,14 @@ SELECT table_schema, table_name, row_format ...@@ -85,8 +85,14 @@ SELECT table_schema, table_name, row_format
FROM information_schema.tables WHERE engine='innodb'; FROM information_schema.tables WHERE engine='innodb';
drop table t1,t2; drop table t1,t2;
# The following should fail even in non-strict mode. # The following should not fail in non-strict mode. (Bug #50945)
SET SESSION innodb_strict_mode = off; SET SESSION innodb_strict_mode = off;
CREATE TABLE t1(
c TEXT NOT NULL, d TEXT NOT NULL,
PRIMARY KEY (c(767),d(767)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
DROP TABLE t1;
SET SESSION innodb_strict_mode = on;
--error ER_TOO_BIG_ROWSIZE --error ER_TOO_BIG_ROWSIZE
CREATE TABLE t1( CREATE TABLE t1(
c TEXT NOT NULL, d TEXT NOT NULL, c TEXT NOT NULL, d TEXT NOT NULL,
......
...@@ -24,6 +24,7 @@ SET GLOBAL innodb_file_per_table=ON; ...@@ -24,6 +24,7 @@ SET GLOBAL innodb_file_per_table=ON;
# Generating 10 tables # Generating 10 tables
# Creating a table with 94 columns and 24 indexes # Creating a table with 94 columns and 24 indexes
DROP TABLE IF EXISTS `table0`; DROP TABLE IF EXISTS `table0`;
set innodb_strict_mode=on;
--error ER_TOO_BIG_ROWSIZE --error ER_TOO_BIG_ROWSIZE
CREATE TABLE IF NOT EXISTS `table0` CREATE TABLE IF NOT EXISTS `table0`
(`col0` BOOL, (`col0` BOOL,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment