mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-7635: Update tests to adapt to the new default sql_mode
This commit is contained in:
@ -395,7 +395,7 @@ Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
EXPLAIN SELECT * FROM t1 WHERE b LIKE 'adfd%';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL b NULL NULL NULL 15 Using where
|
||||
1 SIMPLE t1 range b b 769 NULL 12 Using where
|
||||
DROP TABLE t1;
|
||||
# Test 8) Test creating a table that could lead to undo log overflow.
|
||||
CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
|
||||
|
@ -101,7 +101,7 @@ create index idx1 on worklog5743_1(a2(4000));
|
||||
Got one of the listed errors
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
Error 1071 Specified key was too long; max key length is 767 bytes
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
@ -110,7 +110,7 @@ create index idx2 on worklog5743_1(a2(4000));
|
||||
Got one of the listed errors
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 3072 bytes
|
||||
Error 1071 Specified key was too long; max key length is 3072 bytes
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
create index idx3 on worklog5743_1(a2(436));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
@ -419,7 +419,7 @@ create index idx4 on worklog5743(a1, a2);
|
||||
ERROR 42000: Specified key was too long; max key length is 3072 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 3072 bytes
|
||||
Error 1071 Specified key was too long; max key length is 3072 bytes
|
||||
Error 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx5 on worklog5743(a1, a5);
|
||||
ERROR 42000: Specified key was too long; max key length is 3072 bytes
|
||||
|
@ -1,3 +1,4 @@
|
||||
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
|
||||
CREATE TABLE bug52745 (
|
||||
a2 int(10) unsigned DEFAULT NULL,
|
||||
col37 time DEFAULT NULL,
|
||||
@ -59,7 +60,7 @@ Warnings:
|
||||
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Note 1291 Column 'col82' has duplicated value '' in ENUM
|
||||
Note 1291 Column 'col82' has duplicated value '' in ENUM
|
||||
INSERT INTO bug52745 SET
|
||||
INSERT IGNORE INTO bug52745 SET
|
||||
col40='0000-00-00 00:00:00',
|
||||
col51=16547,
|
||||
col53='7711484',
|
||||
|
@ -98,6 +98,7 @@ create table worklog5743_2(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=2;
|
||||
create table worklog5743_4(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=4;
|
||||
create table worklog5743_8(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=8;
|
||||
create table worklog5743_16(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=16;
|
||||
set sql_mode='';
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
@ -280,6 +281,7 @@ Error 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx7 on worklog5743_16(a1, a2(2000), a3(1068));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set sql_mode=default;
|
||||
insert into worklog5743_1 values(9, repeat("a", 10000));
|
||||
insert into worklog5743_2 values(9, repeat("a", 10000));
|
||||
insert into worklog5743_4 values(9, repeat("a", 10000));
|
||||
@ -406,6 +408,7 @@ a4 varchar(3072),
|
||||
a5 varchar(3069),
|
||||
a6 varchar(3068))
|
||||
ROW_FORMAT=DYNAMIC;
|
||||
set sql_mode='';
|
||||
create index idx1 on worklog5743(a2);
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 3072 bytes
|
||||
@ -443,6 +446,7 @@ worklog5743 CREATE TABLE `worklog5743` (
|
||||
KEY `idx3` (`a4`),
|
||||
KEY `idx6` (`a1`,`a6`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
|
||||
set sql_mode=default;
|
||||
insert into worklog5743 values(9,
|
||||
repeat("a", 20000), repeat("a", 3073),
|
||||
repeat("a", 3072), repeat("a", 3069),
|
||||
@ -503,6 +507,7 @@ rollback;
|
||||
drop table worklog5743;
|
||||
### Test 7 ###
|
||||
create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC;
|
||||
set statement sql_mode = '' for
|
||||
create index idx1 on worklog5743(a(3073));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 3072 bytes
|
||||
|
Reference in New Issue
Block a user