diff options
Diffstat (limited to 'mysql-test/r/partition_innodb.result')
-rw-r--r-- | mysql-test/r/partition_innodb.result | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result index 850e443be5d..b322d63a7e1 100644 --- a/mysql-test/r/partition_innodb.result +++ b/mysql-test/r/partition_innodb.result @@ -734,6 +734,97 @@ SELECT * FROM t1 WHERE d = '1991-01-01'; d 1991-01-01 DROP TABLE t1; +set global default_storage_engine=default; +# +# MDEV-9455: [ERROR] mysqld got signal 11 +# +CREATE TABLE `t1` ( +`DIARY_TOTAL_DAY_SEQ` bigint(20) unsigned NOT NULL AUTO_INCREMENT, +`IMORY_ID` bigint(20) NOT NULL, +`NAME` varchar(75) DEFAULT NULL, +`DATETIME` varchar(10) NOT NULL DEFAULT '', +`DAILY_CALL_CNT` int(11) DEFAULT NULL, +`DAILY_SMS_CNT` int(11) DEFAULT NULL, +`NUMBER` varchar(64) DEFAULT NULL, +`DURATION` varchar(16) DEFAULT NULL, +PRIMARY KEY (`DIARY_TOTAL_DAY_SEQ`,`DATETIME`), +KEY `IDX_t1_01` (`IMORY_ID`,`DATETIME`) +) AUTO_INCREMENT=328702514 DEFAULT CHARSET=utf8mb4 +PARTITION BY RANGE COLUMNS(`DATETIME`) +(PARTITION p0 VALUES LESS THAN ('2015-10-01') ENGINE = InnoDB, +PARTITION p1 VALUES LESS THAN ('2015-11-01') ENGINE = InnoDB, +PARTITION p2 VALUES LESS THAN ('2015-12-01') ENGINE = InnoDB, +PARTITION p3 VALUES LESS THAN ('2016-01-01') ENGINE = InnoDB, +PARTITION p4 VALUES LESS THAN ('2016-02-01') ENGINE = InnoDB, +PARTITION p5 VALUES LESS THAN ('2016-03-01') ENGINE = InnoDB, +PARTITION p6 VALUES LESS THAN ('2016-04-01') ENGINE = InnoDB, +PARTITION p7 VALUES LESS THAN ('2016-05-01') ENGINE = InnoDB, +PARTITION p8 VALUES LESS THAN ('2016-06-01') ENGINE = InnoDB, +PARTITION p9 VALUES LESS THAN ('2016-07-01') ENGINE = InnoDB, +PARTITION p10 VALUES LESS THAN ('2016-08-01') ENGINE = InnoDB) +; +CREATE TABLE `t2` ( +`DIARY_SEQ` bigint(20) unsigned NOT NULL AUTO_INCREMENT, +`IMORY_ID` bigint(20) NOT NULL, +`CALL_TYPE` varchar(1) DEFAULT NULL, +`DATA_TYPE` varchar(1) DEFAULT NULL, +`FEATURES` varchar(1) DEFAULT NULL, +`NAME` varchar(75) DEFAULT NULL, +`NUMBER` varchar(64) DEFAULT NULL, +`DATETIME` datetime NOT NULL, +`REG_DATE` datetime NOT NULL, +`TITLE` varchar(50) DEFAULT NULL, +`BODY` varchar(4200) DEFAULT NULL, +`MIME_TYPE` varchar(32) DEFAULT NULL, +`DURATION` varchar(16) DEFAULT NULL, +`DEVICE_ID` varchar(64) DEFAULT NULL, +`DEVICE_NAME` varchar(32) DEFAULT NULL, +PRIMARY KEY (`DIARY_SEQ`,`DATETIME`,`REG_DATE`), +KEY `IDX_TB_DIARY_01` (`IMORY_ID`,`DATETIME`,`CALL_TYPE`,`NUMBER`), +KEY `IDX_TB_DIARY_02` (`REG_DATE`) +) AUTO_INCREMENT=688799006 DEFAULT CHARSET=utf8mb4 +PARTITION BY RANGE COLUMNS(REG_DATE) +(PARTITION p0 VALUES LESS THAN ('2015-10-01') ENGINE = InnoDB, +PARTITION p1 VALUES LESS THAN ('2015-11-01') ENGINE = InnoDB, +PARTITION p2 VALUES LESS THAN ('2015-12-01') ENGINE = InnoDB, +PARTITION p3 VALUES LESS THAN ('2016-01-01') ENGINE = InnoDB, +PARTITION p4 VALUES LESS THAN ('2016-02-01') ENGINE = InnoDB, +PARTITION p5 VALUES LESS THAN ('2016-03-01') ENGINE = InnoDB, +PARTITION p6 VALUES LESS THAN ('2016-04-01') ENGINE = InnoDB, +PARTITION p7 VALUES LESS THAN ('2016-05-01') ENGINE = InnoDB, +PARTITION p8 VALUES LESS THAN ('2016-06-01') ENGINE = InnoDB, +PARTITION p9 VALUES LESS THAN ('2016-07-01') ENGINE = InnoDB, +PARTITION p10 VALUES LESS THAN ('2016-08-01') ENGINE = InnoDB) +; +SELECT +A.IMORY_ID, +A.NUMBER, +A.NAME, +DATE_FORMAT(A.DATETIME, '%Y-%m-%d') AS TARGET_DATE, +SUM( CASE WHEN A.DATA_TYPE='1' THEN 1 ELSE 0 END) AS CALL_CNT, +SUM( CASE WHEN A.DATA_TYPE IN ('2', '3') THEN 1 ELSE 0 END) AS SMS_CNT, +SUM(CAST(A.DURATION AS INT)) AS DURATION, +( SELECT COUNT(*) +FROM t1 +WHERE IMORY_ID=A.IMORY_ID +AND NUMBER=A.NUMBER +AND NAME=A.NAME +AND DATETIME = DATE_FORMAT(A.DATETIME, '%Y-%m-%d') +) STATS_COUNT +FROM t2 A +WHERE A.IMORY_ID = 55094102 +AND A.DATETIME LIKE ( +SELECT CONCAT (DATE_FORMAT(DATETIME, '%Y-%m-%d') ,'%') +FROM t2 +WHERE IMORY_ID=55094102 +AND DIARY_SEQ IN ( 608351221, 608351225, 608351229 ) +group by DATE_FORMAT(DATETIME, '%Y-%m-%d') +) +GROUP BY A.IMORY_ID, A.NUMBER, A.NAME, DATE_FORMAT(A.DATETIME, '%Y-%m-%d') +; +IMORY_ID NUMBER NAME TARGET_DATE CALL_CNT SMS_CNT DURATION STATS_COUNT +drop table t2, t1; +set global default_storage_engine='innodb'; # # MDEV-5963: InnoDB: Assertion failure in file row0sel.cc line 2503, # Failing assertion: 0 with "key ptr now exceeds key end by 762 bytes" |