Note: It seems the test case should have nothing to do with versioning, but I couldn't reproduce the failures on a non-versioned partitioned table, the last replace ends with ER_RECORD_FILE_FULL as expected. Possibly it's just the matter of exact data length which I failed to achieve.
Note: The test cases are tuned for MTR, which reduces the max_heap_table_size to 1M only. The flow is scalable – to get a failure on a bigger value, e.g. default 16M, just add more REPLACEs or LOADs.
Test case for REPLACE
|
--source include/have_partition.inc
|
|
CREATE TABLE t1 (
|
pk INTEGER AUTO_INCREMENT,
|
PRIMARY KEY (pk),
|
f VARCHAR(45000)
|
) WITH SYSTEM VERSIONING ENGINE=MEMORY
|
PARTITION BY SYSTEM_TIME INTERVAL 1 YEAR (PARTITION p1 HISTORY, PARTITION pn CURRENT);
|
|
INSERT INTO t1 () VALUES (),(),(),(),(),(),(),(),(),(),(),(),(),(),(),();
|
|
REPLACE INTO t1 SELECT * FROM t1;
|
--error ER_RECORD_FILE_FULL
|
REPLACE INTO t1 SELECT * FROM t1;
|
--error ER_RECORD_FILE_FULL
|
REPLACE INTO t1 SELECT * FROM t1;
|
|
# Cleanup
|
DROP TABLE t1;
|
10.3 95f3c142a4
|
2018-12-04 1:27:01 4 [ERROR] mysqld: The table 't1' is full
|
2018-12-04 1:27:01 4 [ERROR] mysqld: The table 't1' is full
|
mysqld: /data/src/10.3/sql/sql_insert.cc:4070: virtual void select_insert::abort_result_set(): Assertion `transactional_table || !changed || thd->transaction.stmt.modified_non_trans_table' failed.
|
181204 1:27:01 [ERROR] mysqld got signal 6 ;
|
|
#7 0x00007ffb5977aee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
|
#8 0x000055b9d05cbc29 in select_insert::abort_result_set (this=0x7ffb38015c80) at /data/src/10.3/sql/sql_insert.cc:4069
|
#9 0x000055b9d0640e7c in handle_select (thd=0x7ffb38000b00, lex=0x7ffb380048e8, result=0x7ffb38015c80, setup_tables_done_option=1073741824) at /data/src/10.3/sql/sql_select.cc:391
|
#10 0x000055b9d06051ce in mysql_execute_command (thd=0x7ffb38000b00) at /data/src/10.3/sql/sql_parse.cc:4833
|
#11 0x000055b9d060f7cb in mysql_parse (thd=0x7ffb38000b00, rawbuf=0x7ffb38014cd8 "REPLACE INTO t1 SELECT * FROM t1", length=32, parser_state=0x7ffb541225f0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8091
|
#12 0x000055b9d05fc97f in dispatch_command (command=COM_QUERY, thd=0x7ffb38000b00, packet=0x7ffb3800b1e1 "REPLACE INTO t1 SELECT * FROM t1", packet_length=32, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1850
|
#13 0x000055b9d05fb3a3 in do_command (thd=0x7ffb38000b00) at /data/src/10.3/sql/sql_parse.cc:1395
|
#14 0x000055b9d07630a0 in do_handle_one_connection (connect=0x55b9d41e1c80) at /data/src/10.3/sql/sql_connect.cc:1402
|
#15 0x000055b9d0762e24 in handle_one_connection (arg=0x55b9d41e1c80) at /data/src/10.3/sql/sql_connect.cc:1308
|
#16 0x000055b9d0bfd41d in pfs_spawn_thread (arg=0x55b9d422e8a0) at /data/src/10.3/storage/perfschema/pfs.cc:1862
|
#17 0x00007ffb5b236494 in start_thread (arg=0x7ffb54123700) at pthread_create.c:333
|
#18 0x00007ffb5983793f in clone () from /lib/x86_64-linux-gnu/libc.so.6
|
Test case for LOAD
|
--source include/have_partition.inc
|
|
CREATE TABLE t1 (
|
pk INTEGER AUTO_INCREMENT,
|
PRIMARY KEY (pk),
|
f VARCHAR(45000)
|
) WITH SYSTEM VERSIONING ENGINE=MEMORY
|
PARTITION BY SYSTEM_TIME INTERVAL 1 YEAR (PARTITION p1 HISTORY, PARTITION pn CURRENT);
|
|
INSERT INTO t1 () VALUES (),(),(),(),(),(),(),(),(),(),(),(),(),(),(),();
|
|
SELECT * FROM t1 INTO OUTFILE 'load.data';
|
LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t1;
|
--error ER_RECORD_FILE_FULL
|
LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t1;
|
--error ER_RECORD_FILE_FULL
|
LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t1;
|
|
# Cleanup
|
--let $datadir= `SELECT @@datadir`
|
--remove_file $datadir/test/load.data
|
DROP TABLE t1;
|
10.3 95f3c142a4
|
2018-12-04 1:33:21 4 [ERROR] mysqld: The table 't1' is full
|
2018-12-04 1:33:21 4 [ERROR] mysqld: The table 't1' is full
|
mysqld: /data/src/10.3/sql/sql_load.cc:795: int mysql_load(THD*, const sql_exchange*, TABLE_LIST*, List<Item>&, List<Item>&, List<Item>&, enum_duplicates, bool, bool): Assertion `transactional_table || !(info.copied || info.deleted) || thd->transaction.stmt.modified_non_trans_table' failed.
|
181204 1:33:21 [ERROR] mysqld got signal 6 ;
|
|
#7 0x00007f228ca88ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
|
#8 0x00005651cd1c0e0a in mysql_load (thd=0x7f226c000b00, ex=0x7f226c014dc8, table_list=0x7f226c014e50, fields_vars=..., set_fields=..., set_values=..., handle_duplicates=DUP_REPLACE, ignore=false, read_file_from_client=false) at /data/src/10.3/sql/sql_load.cc:794
|
#9 0x00005651cd1d531c in mysql_execute_command (thd=0x7f226c000b00) at /data/src/10.3/sql/sql_parse.cc:5126
|
#10 0x00005651cd1de7cb in mysql_parse (thd=0x7f226c000b00, rawbuf=0x7f226c014cd8 "LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t1", length=50, parser_state=0x7f2282c005f0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8091
|
#11 0x00005651cd1cb97f in dispatch_command (command=COM_QUERY, thd=0x7f226c000b00, packet=0x7f226c00b1e1 "LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t1", packet_length=50, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1850
|
#12 0x00005651cd1ca3a3 in do_command (thd=0x7f226c000b00) at /data/src/10.3/sql/sql_parse.cc:1395
|
#13 0x00005651cd3320a0 in do_handle_one_connection (connect=0x5651cfd92c80) at /data/src/10.3/sql/sql_connect.cc:1402
|
#14 0x00005651cd331e24 in handle_one_connection (arg=0x5651cfd92c80) at /data/src/10.3/sql/sql_connect.cc:1308
|
#15 0x00005651cd7cc41d in pfs_spawn_thread (arg=0x5651cfddf8a0) at /data/src/10.3/storage/perfschema/pfs.cc:1862
|
#16 0x00007f228e544494 in start_thread (arg=0x7f2282c01700) at pthread_create.c:333
|
#17 0x00007f228cb4593f in clone () from /lib/x86_64-linux-gnu/libc.so.6
|
No visible problems on a non-debug build.
I couldn't check 10.2 and earlier versions, because couldn't get rid of versioning in the scenario.
{"report":{"fcp":1319.0999994277954,"ttfb":534.2999992370605,"pageVisibility":"visible","entityId":71209,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"cf558cc0-b754-4345-8ffe-9c41c37bafb8","navigationType":0,"readyForUser":1424.2999992370605,"redirectCount":0,"resourceLoadedEnd":1721.5999994277954,"resourceLoadedStart":541.3999996185303,"resourceTiming":[{"duration":244.69999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":541.3999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":541.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":786.0999994277954,"responseStart":0,"secureConnectionStart":0},{"duration":244.9000005722046,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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","startTime":541.5999994277954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":541.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":786.5,"responseStart":0,"secureConnectionStart":0},{"duration":300.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":541.8999996185303,"connectEnd":541.8999996185303,"connectStart":541.8999996185303,"domainLookupEnd":541.8999996185303,"domainLookupStart":541.8999996185303,"fetchStart":541.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":541.8999996185303,"responseEnd":842.0999994277954,"responseStart":842.0999994277954,"secureConnectionStart":541.8999996185303},{"duration":351.29999923706055,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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","startTime":542,"connectEnd":542,"connectStart":542,"domainLookupEnd":542,"domainLookupStart":542,"fetchStart":542,"redirectEnd":0,"redirectStart":0,"requestStart":542,"responseEnd":893.2999992370605,"responseStart":893.2999992370605,"secureConnectionStart":542},{"duration":355.30000019073486,"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":542.2999992370605,"connectEnd":542.2999992370605,"connectStart":542.2999992370605,"domainLookupEnd":542.2999992370605,"domainLookupStart":542.2999992370605,"fetchStart":542.2999992370605,"redirectEnd":0,"redirectStart":0,"requestStart":542.2999992370605,"responseEnd":897.5999994277954,"responseStart":897.5999994277954,"secureConnectionStart":542.2999992370605},{"duration":355.5999994277954,"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":542.5,"connectEnd":542.5,"connectStart":542.5,"domainLookupEnd":542.5,"domainLookupStart":542.5,"fetchStart":542.5,"redirectEnd":0,"redirectStart":0,"requestStart":542.5,"responseEnd":898.0999994277954,"responseStart":898.0999994277954,"secureConnectionStart":542.5},{"duration":355.80000019073486,"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":542.6999998092651,"connectEnd":542.6999998092651,"connectStart":542.6999998092651,"domainLookupEnd":542.6999998092651,"domainLookupStart":542.6999998092651,"fetchStart":542.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":542.6999998092651,"responseEnd":898.5,"responseStart":898.5,"secureConnectionStart":542.6999998092651},{"duration":443,"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":542.7999992370605,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":542.7999992370605,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":985.7999992370605,"responseStart":0,"secureConnectionStart":0},{"duration":356,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":543,"connectEnd":543,"connectStart":543,"domainLookupEnd":543,"domainLookupStart":543,"fetchStart":543,"redirectEnd":0,"redirectStart":0,"requestStart":543,"responseEnd":899,"responseStart":899,"secureConnectionStart":543},{"duration":442.80000019073486,"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":543.0999994277954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":543.0999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":985.8999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":356.30000019073486,"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":543.2999992370605,"connectEnd":543.2999992370605,"connectStart":543.2999992370605,"domainLookupEnd":543.2999992370605,"domainLookupStart":543.2999992370605,"fetchStart":543.2999992370605,"redirectEnd":0,"redirectStart":0,"requestStart":543.2999992370605,"responseEnd":899.5999994277954,"responseStart":899.5999994277954,"secureConnectionStart":543.2999992370605},{"duration":637.5,"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":544.2999992370605,"connectEnd":544.2999992370605,"connectStart":544.2999992370605,"domainLookupEnd":544.2999992370605,"domainLookupStart":544.2999992370605,"fetchStart":544.2999992370605,"redirectEnd":0,"redirectStart":0,"requestStart":544.2999992370605,"responseEnd":1181.7999992370605,"responseStart":1181.7999992370605,"secureConnectionStart":544.2999992370605},{"duration":1177.3000001907349,"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":544.2999992370605,"connectEnd":544.2999992370605,"connectStart":544.2999992370605,"domainLookupEnd":544.2999992370605,"domainLookupStart":544.2999992370605,"fetchStart":544.2999992370605,"redirectEnd":0,"redirectStart":0,"requestStart":544.2999992370605,"responseEnd":1721.5999994277954,"responseStart":1721.5999994277954,"secureConnectionStart":544.2999992370605},{"duration":184.69999980926514,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":997.6999998092651,"connectEnd":997.6999998092651,"connectStart":997.6999998092651,"domainLookupEnd":997.6999998092651,"domainLookupStart":997.6999998092651,"fetchStart":997.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":997.6999998092651,"responseEnd":1182.3999996185303,"responseStart":1182.3999996185303,"secureConnectionStart":997.6999998092651},{"duration":522.7999992370605,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":1273,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1273,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1795.7999992370605,"responseStart":0,"secureConnectionStart":0},{"duration":487,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":1273.8999996185303,"connectEnd":1273.8999996185303,"connectStart":1273.8999996185303,"domainLookupEnd":1273.8999996185303,"domainLookupStart":1273.8999996185303,"fetchStart":1273.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":1273.8999996185303,"responseEnd":1760.8999996185303,"responseStart":1760.8999996185303,"secureConnectionStart":1273.8999996185303},{"duration":491.20000076293945,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":1274.2999992370605,"connectEnd":1274.2999992370605,"connectStart":1274.2999992370605,"domainLookupEnd":1274.2999992370605,"domainLookupStart":1274.2999992370605,"fetchStart":1274.2999992370605,"redirectEnd":0,"redirectStart":0,"requestStart":1274.2999992370605,"responseEnd":1765.5,"responseStart":1765.5,"secureConnectionStart":1274.2999992370605}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":346,"responseStart":535,"responseEnd":539,"domLoading":539,"domInteractive":1747,"domContentLoadedEventStart":1747,"domContentLoadedEventEnd":1796,"domComplete":2223,"loadEventStart":2223,"loadEventEnd":2224,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1723.6999998092651},{"name":"bigPipe.sidebar-id.end","time":1724.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":1724.6999998092651},{"name":"bigPipe.activity-panel-pipe-id.end","time":1726.3999996185303},{"name":"activityTabFullyLoaded","time":1814.0999994277954}],"measures":[],"correlationId":"f4bfe23632f4","effectiveType":"4g","downlink":9.1,"rtt":0,"serverDuration":118,"dbReadsTimeInMs":30,"dbConnsTimeInMs":39,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}