mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
dict_create_index_step(): Be strict about DYNAMIC and COMPRESSED tables.
Bug #50495 is about REDUNDANT and COMPACT tables, after all.
This commit is contained in:
@ -127,12 +127,6 @@ 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,14 +85,9 @@ 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 not fail in non-strict mode. (Bug #50945)
|
# The following should fail in non-strict mode too.
|
||||||
|
# (The fix of Bug #50945 only affects REDUNDANT and COMPACT tables.)
|
||||||
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,
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
Fix Bug#50495 'Row size too large' for plugin, but works for
|
Fix Bug#50495 'Row size too large' for plugin, but works for
|
||||||
built-in InnoDB
|
built-in InnoDB
|
||||||
Only check the record size at index creation time when
|
Only check the record size at index creation time when
|
||||||
innodb_strict_mode is set.
|
innodb_strict_mode is set or when ROW_FORMAT is DYNAMIC or COMPRESSED.
|
||||||
|
|
||||||
2010-04-20 The InnoDB Team
|
2010-04-20 The InnoDB Team
|
||||||
|
|
||||||
|
@ -1105,8 +1105,11 @@ dict_create_index_step(
|
|||||||
|
|
||||||
dulint index_id = node->index->id;
|
dulint index_id = node->index->id;
|
||||||
|
|
||||||
err = dict_index_add_to_cache(node->table, node->index,
|
err = dict_index_add_to_cache(
|
||||||
FIL_NULL, trx_is_strict(trx));
|
node->table, node->index, FIL_NULL,
|
||||||
|
trx_is_strict(trx)
|
||||||
|
|| dict_table_get_format(node->table)
|
||||||
|
>= DICT_TF_FORMAT_ZIP);
|
||||||
|
|
||||||
node->index = dict_index_get_if_in_cache_low(index_id);
|
node->index = dict_index_get_if_in_cache_low(index_id);
|
||||||
ut_a(!node->index == (err != DB_SUCCESS));
|
ut_a(!node->index == (err != DB_SUCCESS));
|
||||||
|
Reference in New Issue
Block a user