diff options
Diffstat (limited to 'mysql-test/suite/innodb')
-rw-r--r-- | mysql-test/suite/innodb/r/innodb_corrupt_bit.result | 1 | ||||
-rw-r--r-- | mysql-test/suite/innodb/r/insert_debug.result | 11 | ||||
-rw-r--r-- | mysql-test/suite/innodb/r/multi_repair-7404.result | 21 | ||||
-rw-r--r-- | mysql-test/suite/innodb/r/sp_temp_table.result | 253 | ||||
-rw-r--r-- | mysql-test/suite/innodb/r/strict_mode.result | 240 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test | 2 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/innodb_bug12400341.test | 2 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/innodb_corrupt_bit.test | 17 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/insert_debug.test | 17 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/multi_repair-7404.test | 18 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/sp_temp_table.test | 103 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/strict_mode.test | 251 |
12 files changed, 933 insertions, 3 deletions
diff --git a/mysql-test/suite/innodb/r/innodb_corrupt_bit.result b/mysql-test/suite/innodb/r/innodb_corrupt_bit.result index 8ec10a86b37..353303825e5 100644 --- a/mysql-test/suite/innodb/r/innodb_corrupt_bit.result +++ b/mysql-test/suite/innodb/r/innodb_corrupt_bit.result @@ -78,4 +78,5 @@ z 31 32 drop table corrupt_bit_test_ā; +DROP DATABASE pad; SET GLOBAL innodb_change_buffering_debug = 0; diff --git a/mysql-test/suite/innodb/r/insert_debug.result b/mysql-test/suite/innodb/r/insert_debug.result new file mode 100644 index 00000000000..0d176afa116 --- /dev/null +++ b/mysql-test/suite/innodb/r/insert_debug.result @@ -0,0 +1,11 @@ +# +# Bug#19904003 INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG=1 +# CAUSES INFINITE PAGE SPLIT +# +SET GLOBAL innodb_change_buffering_debug=1; +SET GLOBAL innodb_limit_optimistic_insert_debug=1; +CREATE TABLE t1(c1 INT PRIMARY KEY) ENGINE=InnoDB +PARTITION BY HASH (c1) PARTITIONS 15; +DROP TABLE t1; +SET GLOBAL innodb_change_buffering_debug=0; +SET GLOBAL innodb_limit_optimistic_insert_debug=0; diff --git a/mysql-test/suite/innodb/r/multi_repair-7404.result b/mysql-test/suite/innodb/r/multi_repair-7404.result new file mode 100644 index 00000000000..b3db5755b87 --- /dev/null +++ b/mysql-test/suite/innodb/r/multi_repair-7404.result @@ -0,0 +1,21 @@ +create table `t1`(`a` int) engine=innodb partition by key (`a`); +create table `t2`(`b` int) engine=innodb; +create table `t3`(`c` int) engine=innodb; +insert t1 values (1); +insert t2 values (2); +insert t3 values (3); +repair table `t1`,`t2`,`t3`; +Table Op Msg_type Msg_text +test.t1 repair status OK +test.t2 repair status OK +test.t3 repair status OK +select * from t1; +a +1 +select * from t2; +b +2 +select * from t3; +c +3 +drop table t1, t2, t3; diff --git a/mysql-test/suite/innodb/r/sp_temp_table.result b/mysql-test/suite/innodb/r/sp_temp_table.result new file mode 100644 index 00000000000..49a2a4aa831 --- /dev/null +++ b/mysql-test/suite/innodb/r/sp_temp_table.result @@ -0,0 +1,253 @@ +# +# Bug #19306524 FAILING ASSERTION WITH TEMP TABLE FOR A PROCEDURE +# CALLED FROM A FUNCTION +# +call mtr.add_suppression("MySQL is trying to drop table"); +CREATE PROCEDURE cachedata( +IN obj_id BIGINT UNSIGNED, +IN start DATETIME, +IN end DATETIME +) +cachedata:BEGIN +DECLARE cache_count BIGINT; +SET @timestamp := NOW(); +CREATE TEMPORARY TABLE IF NOT EXISTS cachedata ( +timestamp DATETIME, +object_id BIGINT UNSIGNED NOT NULL, +start DATETIME, +end DATETIME, +seqno BIGINT AUTO_INCREMENT, +value FLOAT, +PRIMARY KEY (seqno), +INDEX (timestamp), +INDEX (object_id, start, end) +) ENGINE=INNODB; +DELETE FROM cachedata WHERE +timestamp < DATE_SUB(@timestamp, INTERVAL 15 SECOND); +SELECT count(*) INTO cache_count FROM cachedata WHERE +object_id = obj_id +AND start = start +AND end = end; +IF cache_count > 0 THEN LEAVE cachedata; +END IF; +INSERT INTO cachedata (timestamp, object_id, start, end, value) VALUES +(@timestamp, obj_id, start, end, 1234), +(@timestamp, obj_id, start, end, 4567), +(@timestamp, obj_id, start, end, 8901), +(@timestamp, obj_id, start, end, 1234), +(@timestamp, obj_id, start, end, 4567), +(@timestamp, obj_id, start, end, 8901), +(@timestamp, obj_id, start, end, 1234), +(@timestamp, obj_id, start, end, 4567), +(@timestamp, obj_id, start, end, 8901), +(@timestamp, obj_id, start, end, 1234), +(@timestamp, obj_id, start, end, 4567), +(@timestamp, obj_id, start, end, 8901), +(@timestamp, obj_id, start, end, 2345), +(@timestamp, obj_id, start, end, 1234), +(@timestamp, obj_id, start, end, 4567), +(@timestamp, obj_id, start, end, 8901), +(@timestamp, obj_id, start, end, 2345), +(@timestamp, obj_id, start, end, 1234), +(@timestamp, obj_id, start, end, 4567), +(@timestamp, obj_id, start, end, 8901), +(@timestamp, obj_id, start, end, 2345); +END$$ +CREATE FUNCTION get_cache( +obj_id BIGINT UNSIGNED, +start DATETIME, +end DATETIME +) +RETURNS FLOAT +READS SQL DATA +BEGIN +DECLARE result FLOAT; +CALL cachedata(obj_id, start, end); +SELECT SUM(value) INTO result FROM cachedata WHERE +object_id = obj_id +AND start = start +AND end = end; +RETURN result; +END$$ +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +SELECT get_cache(1, '2014-01-01', '2014-02-01'); +get_cache(1, '2014-01-01', '2014-02-01') +95247 +select sleep(1); +sleep(1) +0 +DROP FUNCTION get_cache; +DROP PROCEDURE cachedata; diff --git a/mysql-test/suite/innodb/r/strict_mode.result b/mysql-test/suite/innodb/r/strict_mode.result new file mode 100644 index 00000000000..6d11847cb19 --- /dev/null +++ b/mysql-test/suite/innodb/r/strict_mode.result @@ -0,0 +1,240 @@ +# +# Bug #17852083 PRINT A WARNING WHEN DDL HAS AN ERROR IN +# INNODB_STRICT_MODE = 1 +# +set innodb_strict_mode = 0; +create table t1 (id int auto_increment primary key, +v varchar(32), +col1 text, +col2 text, +col3 text, +col4 text, +col5 text, +col6 text, +col7 text, +col8 text, +col9 text, +col10 text, +col11 text, +col12 text, +col13 text, +col14 text, +col15 text, +col16 text, +col17 text, +col18 text, +col19 text, +col20 text, +col21 text, +col22 text, +col23 text, +col24 text, +col25 text, +col26 text, +col27 text, +col28 text, +col29 text, +col30 text, +col31 text, +col32 text, +col33 text, +col34 text, +col35 text, +col36 text, +col37 text, +col38 text, +col39 text, +col40 text, +col41 text, +col42 text, +col43 text, +col44 text, +col45 text , +col46 text, +col47 text, +col48 text, +col49 text, +col50 text, +col51 text, +col52 text, +col53 text, +col54 text, +col55 text, +col56 text, +col57 text, +col58 text, +col59 text, +col60 text, +col61 text, +col62 text, +col63 text, +col64 text, +col65 text, +col66 text, +col67 text, +col68 text , +col69 text, +col70 text, +col71 text, +col72 text, +col73 text, +col74 text, +col75 text, +col76 text, +col77 text, +col78 text, +col79 text, +col80 text, +col81 text, +col82 text, +col83 text, +col84 text, +col85 text, +col86 text, +col87 text, +col88 text, +col89 text, +col90 text, +col91 text, +col92 text, +col93 text, +col94 text, +col95 text, +col96 text, +col97 text, +col98 text, +col99 text, +col100 text, +col101 text, +col102 text, +col103 text, +col104 text, +col105 text, +col106 text, +col107 text, +col108 text, +col109 text, +col110 text, +col111 text, +col112 text, +col113 text, +col114 text, +col115 text, +col116 text, +col117 text, +col118 text, +col119 text, +col120 text, +col121 text, +col122 text, +col123 text, +col124 text, +col125 text, +col126 text , +col127 text, +col128 text, +col129 text, +col130 text, +col131 text, +col132 text, +col133 text, +col134 text, +col135 text, +col136 text, +col137 text, +col138 text, +col139 text, +col140 text, +col141 text, +col142 text, +col143 text, +col144 text, +col145 text, +col146 text, +col147 text , +col148 text, +col149 text, +col150 text, +col151 text, +col152 text, +col153 text, +col154 text, +col155 text, +col156 text, +col157 text, +col158 text, +col159 text, +col160 text, +col161 text, +col162 text, +col163 text, +col164 text, +col165 text, +col166 text, +col167 text, +col168 text, +col169 text, +col170 text, +col171 text, +col172 text , +col173 text, +col174 text, +col175 text, +col176 text, +col177 text, +col178 text, +col179 text, +col180 text, +col181 text, +col182 text, +col183 text, +col184 text, +col185 text, +col186 text, +col187 text, +col188 text, +col189 text, +col190 text, +col191 text, +col192 text, +col193 text, +col194 text, +col195 text, +col196 text, +col197 text, +col198 text, +col199 text, +col200 text, +col201 text, +col202 text, +col203 text, +col204 text, +col205 text, +col206 text, +col207 text, +col208 text, +col209 text, +col210 text, +col211 text, +col212 text, +col213 text, +col214 text, +col215 text, +col216 text, +col217 text, +col218 text, +col219 text, +col220 text, +col221 text, +col222 text, +col223 text, +col224 text, +col225 text, +col226 text, +col227 text, +col228 text +) ENGINE=InnoDB; +set innodb_strict_mode = 1; +alter table t1 engine=InnoDB; +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 +drop table t1; diff --git a/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test index 1774bb7f796..8cbe4938cab 100644 --- a/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test +++ b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test @@ -14,6 +14,8 @@ if (`select plugin_auth_version < "5.6.17" from information_schema.plugins where --source include/not_embedded.inc # DBUG_SUICIDE() hangs under valgrind --source include/not_valgrind.inc +# No windows, need perl +--source include/not_windows.inc # The flag innodb_change_buffering_debug is only available in debug builds. # It instructs InnoDB to try to evict pages from the buffer pool when diff --git a/mysql-test/suite/innodb/t/innodb_bug12400341.test b/mysql-test/suite/innodb/t/innodb_bug12400341.test index a60a5104c3f..165e19b7cbc 100644 --- a/mysql-test/suite/innodb/t/innodb_bug12400341.test +++ b/mysql-test/suite/innodb/t/innodb_bug12400341.test @@ -10,6 +10,8 @@ if (`select count(*)=0 from information_schema.global_variables where variable_n # Don't test under valgrind, undo slots of the previous test might exist still # and cause unstable result. --source include/not_valgrind.inc +# undo slots of the previous test might exist still +--source include/not_windows.inc # Previous undo slots cause unnecessary failures --source include/not_windows.inc diff --git a/mysql-test/suite/innodb/t/innodb_corrupt_bit.test b/mysql-test/suite/innodb/t/innodb_corrupt_bit.test index c57e52b65cc..12c560934ef 100644 --- a/mysql-test/suite/innodb/t/innodb_corrupt_bit.test +++ b/mysql-test/suite/innodb/t/innodb_corrupt_bit.test @@ -4,6 +4,11 @@ -- source include/have_innodb.inc -- source include/have_innodb_16k.inc +if (`select plugin_auth_version <= "5.5.40-MariaDB-36.1" from information_schema.plugins where plugin_name='innodb'`) +{ + --skip Not fixed in XtraDB as of 5.5.40-MariaDB-36.1 or earlier +} + # Issues with innodb_change_buffering_debug on Windows, so the test scenario # cannot be created on windows --source include/not_windows.inc @@ -18,14 +23,20 @@ call mtr.add_suppression("Flagged corruption of idx.*in CHECK TABLE"); # It instructs InnoDB to try to evict pages from the buffer pool when # change buffering is possible, so that the change buffer will be used # whenever possible. --- error 0,ER_UNKNOWN_SYSTEM_VARIABLE SET @innodb_change_buffering_debug_orig = @@innodb_change_buffering_debug; --- error 0,ER_UNKNOWN_SYSTEM_VARIABLE SET GLOBAL innodb_change_buffering_debug = 1; # Turn off Unique Check to create corrupted index with dup key SET UNIQUE_CHECKS=0; +CREATE DATABASE pad; +let $i=345; +while ($i) +{ + --eval CREATE TABLE pad.t$i (a INT PRIMARY KEY) ENGINE=InnoDB; + dec $i; +} + -- enable_query_log set names utf8; @@ -121,6 +132,6 @@ select z from corrupt_bit_test_ā limit 10; # Drop table drop table corrupt_bit_test_ā; +DROP DATABASE pad; --- error 0, ER_UNKNOWN_SYSTEM_VARIABLE SET GLOBAL innodb_change_buffering_debug = 0; diff --git a/mysql-test/suite/innodb/t/insert_debug.test b/mysql-test/suite/innodb/t/insert_debug.test new file mode 100644 index 00000000000..36ceba2ee8b --- /dev/null +++ b/mysql-test/suite/innodb/t/insert_debug.test @@ -0,0 +1,17 @@ +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_partition.inc + +--echo # +--echo # Bug#19904003 INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG=1 +--echo # CAUSES INFINITE PAGE SPLIT +--echo # + +SET GLOBAL innodb_change_buffering_debug=1; +SET GLOBAL innodb_limit_optimistic_insert_debug=1; +CREATE TABLE t1(c1 INT PRIMARY KEY) ENGINE=InnoDB +PARTITION BY HASH (c1) PARTITIONS 15; +DROP TABLE t1; + +SET GLOBAL innodb_change_buffering_debug=0; +SET GLOBAL innodb_limit_optimistic_insert_debug=0; diff --git a/mysql-test/suite/innodb/t/multi_repair-7404.test b/mysql-test/suite/innodb/t/multi_repair-7404.test new file mode 100644 index 00000000000..0775cd8b200 --- /dev/null +++ b/mysql-test/suite/innodb/t/multi_repair-7404.test @@ -0,0 +1,18 @@ +# +# MDEV-7404 REPAIR multiple tables crash in MDL_ticket::has_stronger_or_equal_type +# + +--source include/have_partition.inc +--source include/have_innodb.inc +create table `t1`(`a` int) engine=innodb partition by key (`a`); +create table `t2`(`b` int) engine=innodb; +create table `t3`(`c` int) engine=innodb; +insert t1 values (1); +insert t2 values (2); +insert t3 values (3); +repair table `t1`,`t2`,`t3`; +select * from t1; +select * from t2; +select * from t3; +drop table t1, t2, t3; + diff --git a/mysql-test/suite/innodb/t/sp_temp_table.test b/mysql-test/suite/innodb/t/sp_temp_table.test new file mode 100644 index 00000000000..b2883f551b9 --- /dev/null +++ b/mysql-test/suite/innodb/t/sp_temp_table.test @@ -0,0 +1,103 @@ +--source include/have_innodb.inc +--source include/big_test.inc + +--echo # +--echo # Bug #19306524 FAILING ASSERTION WITH TEMP TABLE FOR A PROCEDURE +--echo # CALLED FROM A FUNCTION +--echo # + +call mtr.add_suppression("MySQL is trying to drop table"); + +DELIMITER $$; +CREATE PROCEDURE cachedata( + IN obj_id BIGINT UNSIGNED, + IN start DATETIME, + IN end DATETIME +) + +cachedata:BEGIN + DECLARE cache_count BIGINT; + + SET @timestamp := NOW(); + + CREATE TEMPORARY TABLE IF NOT EXISTS cachedata ( + timestamp DATETIME, + object_id BIGINT UNSIGNED NOT NULL, + start DATETIME, + end DATETIME, + seqno BIGINT AUTO_INCREMENT, + value FLOAT, + PRIMARY KEY (seqno), + INDEX (timestamp), + INDEX (object_id, start, end) + ) ENGINE=INNODB; + + DELETE FROM cachedata WHERE + timestamp < DATE_SUB(@timestamp, INTERVAL 15 SECOND); + + SELECT count(*) INTO cache_count FROM cachedata WHERE + object_id = obj_id + AND start = start + AND end = end; + + IF cache_count > 0 THEN LEAVE cachedata; + END IF; + + INSERT INTO cachedata (timestamp, object_id, start, end, value) VALUES + (@timestamp, obj_id, start, end, 1234), + (@timestamp, obj_id, start, end, 4567), + (@timestamp, obj_id, start, end, 8901), + (@timestamp, obj_id, start, end, 1234), + (@timestamp, obj_id, start, end, 4567), + (@timestamp, obj_id, start, end, 8901), + (@timestamp, obj_id, start, end, 1234), + (@timestamp, obj_id, start, end, 4567), + (@timestamp, obj_id, start, end, 8901), + (@timestamp, obj_id, start, end, 1234), + (@timestamp, obj_id, start, end, 4567), + (@timestamp, obj_id, start, end, 8901), + (@timestamp, obj_id, start, end, 2345), + (@timestamp, obj_id, start, end, 1234), + (@timestamp, obj_id, start, end, 4567), + (@timestamp, obj_id, start, end, 8901), + (@timestamp, obj_id, start, end, 2345), + (@timestamp, obj_id, start, end, 1234), + (@timestamp, obj_id, start, end, 4567), + (@timestamp, obj_id, start, end, 8901), + (@timestamp, obj_id, start, end, 2345); + +END$$ + + +CREATE FUNCTION get_cache( + obj_id BIGINT UNSIGNED, + start DATETIME, + end DATETIME +) + RETURNS FLOAT + READS SQL DATA +BEGIN + DECLARE result FLOAT; + + CALL cachedata(obj_id, start, end); + + SELECT SUM(value) INTO result FROM cachedata WHERE + object_id = obj_id + AND start = start + AND end = end; + + RETURN result; +END$$ + +DELIMITER ;$$ + +let $i = 30; +while ($i) +{ + SELECT get_cache(1, '2014-01-01', '2014-02-01'); + select sleep(1); + dec $i; +} + +DROP FUNCTION get_cache; +DROP PROCEDURE cachedata; diff --git a/mysql-test/suite/innodb/t/strict_mode.test b/mysql-test/suite/innodb/t/strict_mode.test new file mode 100644 index 00000000000..9b115091f84 --- /dev/null +++ b/mysql-test/suite/innodb/t/strict_mode.test @@ -0,0 +1,251 @@ +--source include/have_innodb.inc + +if (`select plugin_auth_version <= "5.5.40-MariaDB-36.1" from information_schema.plugins where plugin_name='innodb'`) +{ + --skip Not fixed in XtraDB as of 5.5.40-MariaDB-36.1 or earlier +} + +--echo # +--echo # Bug #17852083 PRINT A WARNING WHEN DDL HAS AN ERROR IN +--echo # INNODB_STRICT_MODE = 1 +--echo # + +set innodb_strict_mode = 0; + +create table t1 (id int auto_increment primary key, +v varchar(32), +col1 text, +col2 text, +col3 text, +col4 text, +col5 text, +col6 text, +col7 text, +col8 text, +col9 text, +col10 text, +col11 text, +col12 text, +col13 text, +col14 text, +col15 text, +col16 text, +col17 text, +col18 text, +col19 text, +col20 text, +col21 text, +col22 text, +col23 text, +col24 text, +col25 text, +col26 text, +col27 text, +col28 text, +col29 text, +col30 text, +col31 text, +col32 text, +col33 text, +col34 text, +col35 text, +col36 text, +col37 text, +col38 text, +col39 text, +col40 text, +col41 text, +col42 text, +col43 text, +col44 text, +col45 text , +col46 text, +col47 text, +col48 text, +col49 text, +col50 text, +col51 text, +col52 text, +col53 text, +col54 text, +col55 text, +col56 text, +col57 text, +col58 text, +col59 text, +col60 text, +col61 text, +col62 text, +col63 text, +col64 text, +col65 text, +col66 text, +col67 text, +col68 text , +col69 text, +col70 text, +col71 text, +col72 text, +col73 text, +col74 text, +col75 text, +col76 text, +col77 text, +col78 text, +col79 text, +col80 text, +col81 text, +col82 text, +col83 text, +col84 text, +col85 text, +col86 text, +col87 text, +col88 text, +col89 text, +col90 text, +col91 text, +col92 text, +col93 text, +col94 text, +col95 text, +col96 text, +col97 text, +col98 text, +col99 text, +col100 text, +col101 text, +col102 text, +col103 text, +col104 text, +col105 text, +col106 text, +col107 text, +col108 text, +col109 text, +col110 text, +col111 text, +col112 text, +col113 text, +col114 text, +col115 text, +col116 text, +col117 text, +col118 text, +col119 text, +col120 text, +col121 text, +col122 text, +col123 text, +col124 text, +col125 text, +col126 text , +col127 text, +col128 text, +col129 text, +col130 text, +col131 text, +col132 text, +col133 text, +col134 text, +col135 text, +col136 text, +col137 text, +col138 text, +col139 text, +col140 text, +col141 text, +col142 text, +col143 text, +col144 text, +col145 text, +col146 text, +col147 text , +col148 text, +col149 text, +col150 text, +col151 text, +col152 text, +col153 text, +col154 text, +col155 text, +col156 text, +col157 text, +col158 text, +col159 text, +col160 text, +col161 text, +col162 text, +col163 text, +col164 text, +col165 text, +col166 text, +col167 text, +col168 text, +col169 text, +col170 text, +col171 text, +col172 text , +col173 text, +col174 text, +col175 text, +col176 text, +col177 text, +col178 text, +col179 text, +col180 text, +col181 text, +col182 text, +col183 text, +col184 text, +col185 text, +col186 text, +col187 text, +col188 text, +col189 text, +col190 text, +col191 text, +col192 text, +col193 text, +col194 text, +col195 text, +col196 text, +col197 text, +col198 text, +col199 text, +col200 text, +col201 text, +col202 text, +col203 text, +col204 text, +col205 text, +col206 text, +col207 text, +col208 text, +col209 text, +col210 text, +col211 text, +col212 text, +col213 text, +col214 text, +col215 text, +col216 text, +col217 text, +col218 text, +col219 text, +col220 text, +col221 text, +col222 text, +col223 text, +col224 text, +col225 text, +col226 text, +col227 text, +col228 text +) ENGINE=InnoDB; + +set innodb_strict_mode = 1; +--error ER_TOO_BIG_ROWSIZE +alter table t1 engine=InnoDB; + +drop table t1; |