Test case:
--source include/have_innodb.inc
|
--source include/have_partition.inc
|
|
CREATE TABLE t1 (f1 VARCHAR(512) CHARACTER SET utf8) ENGINE=InnoDB;
|
INSERT INTO t1 VALUES ('j');
|
|
CREATE TABLE t2 (
|
f2 VARCHAR(5) CHARACTER SET latin1,
|
f3 VARCHAR(5) CHARACTER SET utf8,
|
f4 INT,
|
f5 VARCHAR(512) CHARACTER SET utf8,
|
f6 VARCHAR(256) CHARACTER SET utf8,
|
key (f2),
|
key (f3),
|
key (f5)
|
) ENGINE=InnoDB PARTITION BY LIST COLUMNS (f4)
|
SUBPARTITION BY KEY(f6) SUBPARTITIONS 4 (
|
PARTITION p0 VALUES IN (1,3,9,null),
|
PARTITION p1 VALUES IN (2,4,0)
|
);
|
|
INSERT INTO t2 VALUES
|
('k','s',3,'b','j'),('a','b',NULL,'v','j'),('c','m',9,'t',NULL),
|
('b','l',9,'b',NULL),('i','y',3,'o','w'),('c','m',NULL,'a','m'),
|
('f','o',9,'m','w'),('f','q',NULL,'o','a');
|
|
CREATE TABLE t3 LIKE t2;
|
|
SELECT * FROM t1 INNER JOIN t2 ON ( f5 = f1 );
|
INSERT INTO t3 SELECT * FROM t2 WHERE f3 = 'm' AND f2 ='c';
|
2014-03-27 15:56:21 7f7f87ee9700 InnoDB: Warning: using a partial-field key prefix in search.
|
InnoDB: index `f5` of table `test`.`t2` /* Partition `p0`, Subpartition `p0sp2` */. Last data field length 768 bytes,
|
InnoDB: key ptr now exceeds key end by 762 bytes.
|
InnoDB: Key value in the MySQL format:
|
len 6; hex 000000000203; asc ;
|
2014-03-27 15:56:21 7f7f87ee9700 InnoDB: Assertion failure in thread 140185718134528 in file row0sel.cc line 2503
|
InnoDB: Failing assertion: 0
|
InnoDB: We intentionally generate a memory trap.
|
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
|
InnoDB: If you get repeated assertion failures or crashes, even
|
InnoDB: immediately after the mysqld startup, there may be
|
InnoDB: corruption in the InnoDB tablespace. Please refer to
|
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
|
InnoDB: about forcing recovery.
|
140327 15:56:21 [ERROR] mysqld got signal 6 ;
|
#5 0x00007f7f8602c6f0 in *__GI_abort () at abort.c:92
|
#6 0x0000000000c865cd in row_sel_convert_mysql_key_to_innobase (tuple=0x7f7f59d803d0, buf=0x7f7f59d6d81f "\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\2
|
45\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\24
|
5\245\245\245\245\245\245\245
|
\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245"..., buf_len=3136, index=0x7f7f59c837f8, key_ptr=0x7f7f59e0a38a "", key_len=6, trx=0x7f7f59cbd478) at 10.0/storage/xtradb/row/row0sel.cc:2503
|
#7 0x0000000000b6e6b5 in ha_innobase::index_read (this=0x7f7f59d6d088, buf=0x7f7f59c98088 "\375\001c", key_ptr=0x7f7f59e0a08a "", key_len=6, find_flag=HA_READ_KEY_EXACT) at 10.0/storage/xtradb/handler/ha_innodb.cc:8302
|
#8 0x0000000000b6f8d8 in ha_innobase::rnd_pos (this=0x7f7f59d6d088, buf=0x7f7f59c98088 "\375\001c", pos=0x7f7f59e0a08a "") at 10.0/storage/xtradb/handler/ha_innodb.cc:8854
|
#9 0x0000000000862614 in handler::ha_rnd_pos (this=0x7f7f59d6d088, buf=0x7f7f59c98088 "\375\001c", pos=0x7f7f59e0a08a "") at 10.0/sql/handler.cc:2530
|
#10 0x0000000000df7964 in ha_partition::rnd_pos (this=0x7f7f59d37888, buf=0x7f7f59c98088 "\375\001c", pos=0x7f7f59e0a088 "\002") at 10.0/sql/ha_partition.cc:5028
|
#11 0x00000000008625ca in handler::ha_rnd_pos (this=0x7f7f59d37888, buf=0x7f7f59c98088 "\375\001c", pos=0x7f7f59e0a088 "\002") at 10.0/sql/handler.cc:2530
|
#12 0x000000000097fe71 in QUICK_ROR_INTERSECT_SELECT::get_next (this=0x7f7f59ca72f0) at 10.0/sql/opt_range.cc:11424
|
#13 0x000000000098f15d in rr_quick (info=0x7f7f59c6b5e8) at 10.0/sql/records.cc:346
|
#14 0x00000000006d4a91 in join_init_read_record (tab=0x7f7f59c6b540) at 10.0/sql/sql_select.cc:18357
|
#15 0x00000000006d2a07 in sub_select (join=0x7f7f59c23700, join_tab=0x7f7f59c6b540, end_of_records=false) at 10.0/sql/sql_select.cc:17464
|
#16 0x00000000006d22ce in do_select (join=0x7f7f59c23700, fields=0x7f7f67fbf578, table=0x0, procedure=0x0) at 10.0/sql/sql_select.cc:17129
|
#17 0x00000000006afd5e in JOIN::exec_inner (this=0x7f7f59c23700) at 10.0/sql/sql_select.cc:3065
|
#18 0x00000000006ad270 in JOIN::exec (this=0x7f7f59c23700) at 10.0/sql/sql_select.cc:2355
|
#19 0x00000000006b0607 in mysql_select (thd=0x7f7f67fbb070, rref_pointer_array=0x7f7f67fbf6d8, tables=0x7f7f59c228d8, wild_num=1, fields=..., conds=0x7f7f59c234f8, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=3489925888, result=0x7f7f59c23668, unit=0x7f7f67fbed78, select_lex=0x7f7f67fbf460) at 10.0/sql/sql_select.cc:3293
|
#20 0x00000000006a6d1f in handle_select (thd=0x7f7f67fbb070, lex=0x7f7f67fbecb0, result=0x7f7f59c23668, setup_tables_done_option=1073741824) at 10.0/sql/sql_select.cc:372
|
#21 0x0000000000676549 in mysql_execute_command (thd=0x7f7f67fbb070) at 10.0/sql/sql_parse.cc:3555
|
#22 0x000000000067e2dd in mysql_parse (thd=0x7f7f67fbb070, rawbuf=0x7f7f59c22088 "INSERT INTO t3 SELECT * FROM t2 WHERE f3 = 'm' AND f2 ='c'", length=58, parser_state=0x7f7f87ee8610) at 10.0/sql/sql_parse.cc:6446
|
#23 0x00000000006710a4 in dispatch_command (command=COM_QUERY, thd=0x7f7f67fbb070, packet=0x7f7f682a0071 "INSERT INTO t3 SELECT * FROM t2 WHERE f3 = 'm' AND f2 ='c'", packet_length=58) at 10.0/sql/sql_parse.cc:1308
|
#24 0x0000000000670446 in do_command (thd=0x7f7f67fbb070) at 10.0/sql/sql_parse.cc:1005
|
#25 0x000000000078ae82 in do_handle_one_connection (thd_arg=0x7f7f67fbb070) at 10.0/sql/sql_connect.cc:1379
|
#26 0x000000000078abd5 in handle_one_connection (arg=0x7f7f67fbb070) at 10.0/sql/sql_connect.cc:1293
|
#27 0x0000000000a307d8 in pfs_spawn_thread (arg=0x7f7f67fe6170) at 10.0/storage/perfschema/pfs.cc:1853
|
#28 0x00007f7f87bc6b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
|
#29 0x00007f7f860d1a7d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
|
Stack trace from:
revision-id: psergey@askmonty.org-20140327090800-l3je8eqjrfx21iki
|
date: 2014-03-27 13:08:00 +0400
|
build-date: 2014-03-27 16:00:24 +0400
|
revno: 4116
|
branch-nick: 10.0
|
{"report":{"fcp":1591.2999997138977,"ttfb":443.09999990463257,"pageVisibility":"visible","entityId":33802,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"9b59f419-4373-43b4-bd2b-addabc33fcc6","navigationType":0,"readyForUser":1759.9000000953674,"redirectCount":0,"resourceLoadedEnd":1359.7999997138977,"resourceLoadedStart":448.90000009536743,"resourceTiming":[{"duration":368.2999997138977,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":448.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":448.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":817.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":368.40000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":449.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":449.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":817.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":534.2999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":449.40000009536743,"connectEnd":821.9000000953674,"connectStart":821.9000000953674,"domainLookupEnd":821.9000000953674,"domainLookupStart":821.9000000953674,"fetchStart":449.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":822.2999997138977,"responseEnd":983.6999998092651,"responseStart":836.5,"secureConnectionStart":821.9000000953674},{"duration":768.9000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":449.5,"connectEnd":449.5,"connectStart":449.5,"domainLookupEnd":449.5,"domainLookupStart":449.5,"fetchStart":449.5,"redirectEnd":0,"redirectStart":0,"requestStart":822.9000000953674,"responseEnd":1218.4000000953674,"responseStart":838,"secureConnectionStart":449.5},{"duration":388,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":449.7999997138977,"connectEnd":449.7999997138977,"connectStart":449.7999997138977,"domainLookupEnd":449.7999997138977,"domainLookupStart":449.7999997138977,"fetchStart":449.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":823.0999999046326,"responseEnd":837.7999997138977,"responseStart":834.9000000953674,"secureConnectionStart":449.7999997138977},{"duration":387.8999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":449.90000009536743,"connectEnd":449.90000009536743,"connectStart":449.90000009536743,"domainLookupEnd":449.90000009536743,"domainLookupStart":449.90000009536743,"fetchStart":449.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":823.6999998092651,"responseEnd":837.7999997138977,"responseStart":835.5999999046326,"secureConnectionStart":449.90000009536743},{"duration":402.7000002861023,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":450.19999980926514,"connectEnd":450.19999980926514,"connectStart":450.19999980926514,"domainLookupEnd":450.19999980926514,"domainLookupStart":450.19999980926514,"fetchStart":450.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":828.9000000953674,"responseEnd":852.9000000953674,"responseStart":847.2999997138977,"secureConnectionStart":450.19999980926514},{"duration":377.09999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":450.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":450.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":827.5,"responseStart":0,"secureConnectionStart":0},{"duration":406.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":450.59999990463257,"connectEnd":450.59999990463257,"connectStart":450.59999990463257,"domainLookupEnd":450.59999990463257,"domainLookupStart":450.59999990463257,"fetchStart":450.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":832.0999999046326,"responseEnd":857.0999999046326,"responseStart":853.6999998092651,"secureConnectionStart":450.59999990463257},{"duration":378.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":450.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":450.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":829.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":408.7999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":450.90000009536743,"connectEnd":450.90000009536743,"connectStart":450.90000009536743,"domainLookupEnd":450.90000009536743,"domainLookupStart":450.90000009536743,"fetchStart":450.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":832.5,"responseEnd":859.6999998092651,"responseStart":854.5,"secureConnectionStart":450.90000009536743},{"duration":794.4000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":467.19999980926514,"connectEnd":467.19999980926514,"connectStart":467.19999980926514,"domainLookupEnd":467.19999980926514,"domainLookupStart":467.19999980926514,"fetchStart":467.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":1008.7999997138977,"responseEnd":1261.5999999046326,"responseStart":1246.5,"secureConnectionStart":467.19999980926514},{"duration":883.0999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":476.69999980926514,"connectEnd":476.69999980926514,"connectStart":476.69999980926514,"domainLookupEnd":476.69999980926514,"domainLookupStart":476.69999980926514,"fetchStart":476.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":1335.9000000953674,"responseEnd":1359.7999997138977,"responseStart":1348.2999997138977,"secureConnectionStart":476.69999980926514},{"duration":266.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1125.9000000953674,"connectEnd":1125.9000000953674,"connectStart":1125.9000000953674,"domainLookupEnd":1125.9000000953674,"domainLookupStart":1125.9000000953674,"fetchStart":1125.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":1339.5,"responseEnd":1392.4000000953674,"responseStart":1391.1999998092651,"secureConnectionStart":1125.9000000953674},{"duration":333.90000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1454.7999997138977,"connectEnd":1454.7999997138977,"connectStart":1454.7999997138977,"domainLookupEnd":1454.7999997138977,"domainLookupStart":1454.7999997138977,"fetchStart":1454.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":1739.5,"responseEnd":1788.6999998092651,"responseStart":1768.9000000953674,"secureConnectionStart":1454.7999997138977},{"duration":400.5,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1501,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1501,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1901.5,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":265,"responseStart":443,"responseEnd":476,"domLoading":447,"domInteractive":1928,"domContentLoadedEventStart":1928,"domContentLoadedEventEnd":1987,"domComplete":2507,"loadEventStart":2507,"loadEventEnd":2507,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1904.7999997138977},{"name":"bigPipe.sidebar-id.end","time":1905.5999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":1905.6999998092651},{"name":"bigPipe.activity-panel-pipe-id.end","time":1908.1999998092651},{"name":"activityTabFullyLoaded","time":2006.0999999046326}],"measures":[],"correlationId":"3a283323f72cc1","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":100,"dbReadsTimeInMs":10,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
It is also possible to get this error: Incorrect key file for table 't2'; try to repair it
CREATE TABLE t1 (f1 VARCHAR(512) CHARACTER SET utf8) ENGINE=InnoDB;
INSERT INTO t1 VALUES ('j');
CREATE TABLE t2 (
f2 VARCHAR(5) CHARACTER SET latin1,
f3 VARCHAR(5) CHARACTER SET utf8,
f4 INT,
f5 VARCHAR(512) CHARACTER SET utf8,
f6 VARCHAR(256) CHARACTER SET utf8,
key (f2),
key (f3),
key (f5)
) ENGINE=InnoDB PARTITION BY LIST COLUMNS (f4)
SUBPARTITION BY KEY(f6) SUBPARTITIONS 4 (
PARTITION p0 VALUES IN (1,3,9,null),
PARTITION p1 VALUES IN (2,4,0)
);
INSERT INTO t2 VALUES
('k','s',3,'b','j'),('a','b',NULL,'v','j'),('c','m',9,'t',NULL),
('b','l',9,'b',NULL),('i','y',3,'o','w'),('c','m',NULL,'a','m'),
('f','o',9,'m','w'),('f','q',NULL,'o','a');
CREATE TABLE t3 LIKE t2;
INSERT INTO t3 SELECT * FROM t2 WHERE f3 = 'm' AND f2 ='c';
ERROR 1034 (HY000): Incorrect key file for table 't2'; try to repair it