# Storage engine to be tested # harmless (at least with the following statements) let $engine= 'BDB'; # harmless (at least with the following statements) let $engine= 'MEMORY'; # Crash, but already at SELECT * FROM t1 WHERE f_int1 = 2 !! let $engine= 'InnoDB'; # Crash let $engine= 'MyISAM'; let $engine= 'MyISAM'; eval SET SESSION storage_engine=$engine; let $unique= , PRIMARY KEY(f_int1,f_int2); # harmless (at least with the following statements) let $unique= , PRIMARY KEY(f_int1); # + PARTITION BY RANGE(f_int1) # CRASH let $unique= , PRIMARY KEY(f_int1,f_int2); # CRASH let $unique= , UNIQUE KEY(f_int1,f_int2); # harmless (at least with the following statements) let $unique= , PRIMARY KEY(f_char1,f_int1,f_int2); # CRASH let $unique= , PRIMARY KEY(f_int1,f_char1,f_int2); # harmless (at least with the following statements) let $unique= , PRIMARY KEY(f_int2,f_int1); --disable_warnings DROP TABLE IF EXISTS t1; --enable_warnings #----------- PARTITION BY RANGE -- SUBPARTITION BY HASH # harmless (at least with the following statements) PARTITION BY RANGE((f_int1 + f_int2) DIV 2) SUBPARTITION BY HASH(f_int2) SUBPARTITIONS 2 eval CREATE TABLE t1 ( f_int1 INTEGER,f_int2 INTEGER, f_char1 VARCHAR(10) $unique ) PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int2) SUBPARTITIONS 2 ( PARTITION parta VALUES LESS THAN (0), PARTITION parte VALUES LESS THAN (2), PARTITION partf VALUES LESS THAN (2147483647)); SELECT * FROM t1 WHERE f_int1 = 2; # The next INSERT seems to be necessary for the crash # INSERT INTO t1 VALUES(2,2,'####2####'); gives the "same" effect INSERT INTO t1 VALUES(10,10,'####10####'); SELECT * FROM t1 WHERE f_int1 = 3; # harmless (at least with the following SELECT) INSERT INTO t1 VALUES(1,1,'####1####'); INSERT INTO t1 VALUES(3,3,'####3####'); # harmless SELECT * FROM t1 WHERE f_int1 = -1; # harmless SELECT * FROM t1 WHERE f_int1 = 1; # Crash SELECT * FROM t1 WHERE f_int1 = 5; # Crash SELECT * FROM t1 WHERE f_int1 = 4; SELECT * FROM t1 WHERE f_int1 = 4; #### So it looks like the crash appears under the following conditions # 1. storage engine in (MyISAM,InnoDB) # MEMORY and BDB are harmless at least with the following statements. # 2. first column of PRIMARY KEY/UNIQUE INDEX = single column used in function for PARTITIONS # 3. SUBPARTITIONING is used # 4. Two INSERTs INTO the last RANGE partition # 5. SELECT on the last partition