Note: Since I couldn't get rid of the temporary table in the scenario, it will become invalid when MDEV-21427 is fixed; but before closing it as not reproducible anymore or as a duplicate, please make sure that it's indeed just a side-effect of MDEV-21427 and doesn't have another underlying cause which will be masked by ER_PERIOD_TEMPORARY_NOT_ALLOWED.
--source include/have_innodb.inc
|
|
CREATE TABLE t1 (a INT, s DATE, e DATE, PERIOD FOR app(s,e)) ENGINE=InnoDB;
|
CREATE TEMPORARY TABLE tmp LIKE t1;
|
INSERT INTO tmp VALUES (1,'2001-01-01','2001-12-31');
|
INSERT INTO t1 VALUES (2,'2002-01-01','2002-12-31');
|
CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SELECT a INTO @a FROM tmp LIMIT 1;
|
CREATE TRIGGER tr2 AFTER INSERT ON t1 FOR EACH ROW DELETE FROM tmp LIMIT 1;
|
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
--error ER_CONSTRAINT_FAILED
|
INSERT INTO t1 VALUES (3,'2003-01-01','2003-01-01');
|
INSERT INTO t1 SELECT * FROM t1;
|
|
# Cleanup
|
DROP TABLE t1;
|
10.4 9d036f84
|
2020-01-06 16:53:11 0x7f142d493700 InnoDB: Assertion failure in file /data/src/10.4/storage/innobase/row/row0mysql.cc line 1807
|
InnoDB: Failing assertion: prebuilt->template_type == ROW_MYSQL_WHOLE_ROW
|
|
#6 0x00005618bc9efdd4 in ut_dbg_assertion_failed (expr=0x5618bd14a2d8 "prebuilt->template_type == ROW_MYSQL_WHOLE_ROW", file=0x5618bd1494b8 "/data/src/10.4/storage/innobase/row/row0mysql.cc", line=1807) at /data/src/10.4/storage/innobase/ut/ut0dbg.cc:60
|
#7 0x00005618bc90dcd5 in row_update_for_mysql (prebuilt=0x7f13d81b1948) at /data/src/10.4/storage/innobase/row/row0mysql.cc:1807
|
#8 0x00005618bc76aea2 in ha_innobase::delete_row (this=0x7f13d81afd68, record=0x7f13d8077a80 "\377") at /data/src/10.4/storage/innobase/handler/ha_innodb.cc:8972
|
#9 0x00005618bc52c68e in handler::ha_delete_row (this=0x7f13d81afd68, buf=0x7f13d8077a80 "\377") at /data/src/10.4/sql/handler.cc:6783
|
#10 0x00005618bc6e6ce7 in TABLE::delete_row (this=0x7f13d81aef00) at /data/src/10.4/sql/sql_delete.cc:289
|
#11 0x00005618bc6e3aa0 in mysql_delete (thd=0x7f13d8000af0, table_list=0x7f13d81a9b00, conds=0x0, order_list=0x7f13d81ab998, limit=1, options=0, result=0x0) at /data/src/10.4/sql/sql_delete.cc:804
|
#12 0x00005618bc1beb52 in mysql_execute_command (thd=0x7f13d8000af0) at /data/src/10.4/sql/sql_parse.cc:4728
|
#13 0x00005618bc0ccb30 in sp_instr_stmt::exec_core (this=0x7f13d81aa258, thd=0x7f13d8000af0, nextp=0x7f142d4904e4) at /data/src/10.4/sql/sp_head.cc:3668
|
#14 0x00005618bc0cbf05 in sp_lex_keeper::reset_lex_and_exec_core (this=0x7f13d81aa2a0, thd=0x7f13d8000af0, nextp=0x7f142d4904e4, open_tables=false, instr=0x7f13d81aa258) at /data/src/10.4/sql/sp_head.cc:3400
|
#15 0x00005618bc0cc6f4 in sp_instr_stmt::execute (this=0x7f13d81aa258, thd=0x7f13d8000af0, nextp=0x7f142d4904e4) at /data/src/10.4/sql/sp_head.cc:3574
|
#16 0x00005618bc0c5ded in sp_head::execute (this=0x7f13d81a8da8, thd=0x7f13d8000af0, merge_da_on_success=false) at /data/src/10.4/sql/sp_head.cc:1346
|
#17 0x00005618bc0c7383 in sp_head::execute_trigger (this=0x7f13d81a8da8, thd=0x7f13d8000af0, db_name=0x7f13d800b1a8, table_name=0x7f13d800b1b8, grant_info=0x7f13d8074c88) at /data/src/10.4/sql/sp_head.cc:1818
|
#18 0x00005618bc2bccc4 in Table_triggers_list::process_triggers (this=0x7f13d80724a8, thd=0x7f13d8000af0, event=TRG_EVENT_INSERT, time_type=TRG_ACTION_AFTER, old_row_is_record1=true) at /data/src/10.4/sql/sql_trigger.cc:2214
|
#19 0x00005618bc172856 in write_record (thd=0x7f13d8000af0, table=0x7f13d806fe60, info=0x7f13d80170d0) at /data/src/10.4/sql/sql_insert.cc:2073
|
#20 0x00005618bc1780cd in select_insert::send_data (this=0x7f13d8017088, values=...) at /data/src/10.4/sql/sql_insert.cc:3967
|
#21 0x00005618bc23e145 in end_send (join=0x7f13d8017138, join_tab=0x7f13d8018e88, end_of_records=false) at /data/src/10.4/sql/sql_select.cc:21444
|
#22 0x00005618bc23b7d7 in evaluate_join_record (join=0x7f13d8017138, join_tab=0x7f13d8018ae0, error=0) at /data/src/10.4/sql/sql_select.cc:20475
|
#23 0x00005618bc251f4c in AGGR_OP::end_send (this=0x7f13d8019110) at /data/src/10.4/sql/sql_select.cc:28544
|
#24 0x00005618bc23ab26 in sub_select_postjoin_aggr (join=0x7f13d8017138, join_tab=0x7f13d8018ae0, end_of_records=true) at /data/src/10.4/sql/sql_select.cc:19969
|
#25 0x00005618bc23ae89 in sub_select (join=0x7f13d8017138, join_tab=0x7f13d8018738, end_of_records=true) at /data/src/10.4/sql/sql_select.cc:20204
|
#26 0x00005618bc23a5b2 in do_select (join=0x7f13d8017138, procedure=0x0) at /data/src/10.4/sql/sql_select.cc:19795
|
#27 0x00005618bc20f72f in JOIN::exec_inner (this=0x7f13d8017138) at /data/src/10.4/sql/sql_select.cc:4452
|
#28 0x00005618bc20e86c in JOIN::exec (this=0x7f13d8017138) at /data/src/10.4/sql/sql_select.cc:4234
|
#29 0x00005618bc20ff81 in mysql_select (thd=0x7f13d8000af0, tables=0x7f13d8013f08, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=3489925888, result=0x7f13d8017088, unit=0x7f13d8004a18, select_lex=0x7f13d8013948) at /data/src/10.4/sql/sql_select.cc:4666
|
#30 0x00005618bc1ffb32 in handle_select (thd=0x7f13d8000af0, lex=0x7f13d8004958, result=0x7f13d8017088, setup_tables_done_option=1073741824) at /data/src/10.4/sql/sql_select.cc:420
|
#31 0x00005618bc1be56a in mysql_execute_command (thd=0x7f13d8000af0) at /data/src/10.4/sql/sql_parse.cc:4643
|
#32 0x00005618bc1ca3b7 in mysql_parse (thd=0x7f13d8000af0, rawbuf=0x7f13d8013198 "INSERT INTO t1 SELECT * FROM t1", length=31, parser_state=0x7f142d492160, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7901
|
#33 0x00005618bc1b555c in dispatch_command (command=COM_QUERY, thd=0x7f13d8000af0, packet=0x7f13d8137281 "INSERT INTO t1 SELECT * FROM t1", packet_length=31, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1842
|
#34 0x00005618bc1b3be9 in do_command (thd=0x7f13d8000af0) at /data/src/10.4/sql/sql_parse.cc:1360
|
#35 0x00005618bc33cb5f in do_handle_one_connection (connect=0x5618bf3ed8e0) at /data/src/10.4/sql/sql_connect.cc:1412
|
#36 0x00005618bc33c8ae in handle_one_connection (arg=0x5618bf3ed8e0) at /data/src/10.4/sql/sql_connect.cc:1316
|
#37 0x00005618bcd42035 in pfs_spawn_thread (arg=0x5618bf359fb0) at /data/src/10.4/storage/perfschema/pfs.cc:1862
|
#38 0x00007f143604a4a4 in start_thread (arg=0x7f142d493700) at pthread_create.c:456
|
#39 0x00007f143417ed0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
|
Reproducible with 10.4 and 10.5.
Both debug and non-debug builds are affected.
Both debug
{"report":{"fcp":1663.1000000014901,"ttfb":587.1999999992549,"pageVisibility":"visible","entityId":82090,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":16,"apdex":0.5,"journeyId":"f8c9de2c-2061-470d-ba22-091665bd6a18","navigationType":0,"readyForUser":1754.3999999985099,"redirectCount":0,"resourceLoadedEnd":2094.800000000745,"resourceLoadedStart":594.1999999992549,"resourceTiming":[{"duration":247.60000000149012,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":594.1999999992549,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":594.1999999992549,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":841.8000000007451,"responseStart":0,"secureConnectionStart":0},{"duration":247.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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":594.3999999985099,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":594.3999999985099,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":841.8999999985099,"responseStart":0,"secureConnectionStart":0},{"duration":495.30000000074506,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":594.5,"connectEnd":594.5,"connectStart":594.5,"domainLookupEnd":594.5,"domainLookupStart":594.5,"fetchStart":594.5,"redirectEnd":0,"redirectStart":0,"requestStart":594.5,"responseEnd":1089.800000000745,"responseStart":1089.800000000745,"secureConnectionStart":594.5},{"duration":670.6999999992549,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":594.6000000014901,"connectEnd":594.6000000014901,"connectStart":594.6000000014901,"domainLookupEnd":594.6000000014901,"domainLookupStart":594.6000000014901,"fetchStart":594.6000000014901,"redirectEnd":0,"redirectStart":0,"requestStart":594.6000000014901,"responseEnd":1265.300000000745,"responseStart":1265.300000000745,"secureConnectionStart":594.6000000014901},{"duration":667.0999999977648,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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":594.6000000014901,"connectEnd":594.6000000014901,"connectStart":594.6000000014901,"domainLookupEnd":594.6000000014901,"domainLookupStart":594.6000000014901,"fetchStart":594.6000000014901,"redirectEnd":0,"redirectStart":0,"requestStart":594.6000000014901,"responseEnd":1261.699999999255,"responseStart":1261.699999999255,"secureConnectionStart":594.6000000014901},{"duration":681.9000000022352,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":595.3999999985099,"connectEnd":595.3999999985099,"connectStart":595.3999999985099,"domainLookupEnd":595.3999999985099,"domainLookupStart":595.3999999985099,"fetchStart":595.3999999985099,"redirectEnd":0,"redirectStart":0,"requestStart":595.3999999985099,"responseEnd":1277.300000000745,"responseStart":1277.300000000745,"secureConnectionStart":595.3999999985099},{"duration":682.0999999977648,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":595.6000000014901,"connectEnd":595.6000000014901,"connectStart":595.6000000014901,"domainLookupEnd":595.6000000014901,"domainLookupStart":595.6000000014901,"fetchStart":595.6000000014901,"redirectEnd":0,"redirectStart":0,"requestStart":595.6000000014901,"responseEnd":1277.699999999255,"responseStart":1277.699999999255,"secureConnectionStart":595.6000000014901},{"duration":688.6999999992549,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":595.8000000007451,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":595.8000000007451,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1284.5,"responseStart":0,"secureConnectionStart":0},{"duration":682.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":595.8000000007451,"connectEnd":595.8000000007451,"connectStart":595.8000000007451,"domainLookupEnd":595.8000000007451,"domainLookupStart":595.8000000007451,"fetchStart":595.8000000007451,"redirectEnd":0,"redirectStart":0,"requestStart":595.8000000007451,"responseEnd":1278.300000000745,"responseStart":1278.300000000745,"secureConnectionStart":595.8000000007451},{"duration":688.7000000029802,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/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":595.8999999985099,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":595.8999999985099,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1284.6000000014901,"responseStart":0,"secureConnectionStart":0},{"duration":683.1999999992549,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/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":596,"connectEnd":596,"connectStart":596,"domainLookupEnd":596,"domainLookupStart":596,"fetchStart":596,"redirectEnd":0,"redirectStart":0,"requestStart":596,"responseEnd":1279.199999999255,"responseStart":1279.199999999255,"secureConnectionStart":596},{"duration":1245.3999999985099,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":604.6000000014901,"connectEnd":604.6000000014901,"connectStart":604.6000000014901,"domainLookupEnd":604.6000000014901,"domainLookupStart":604.6000000014901,"fetchStart":604.6000000014901,"redirectEnd":0,"redirectStart":0,"requestStart":604.6000000014901,"responseEnd":1850,"responseStart":1850,"secureConnectionStart":604.6000000014901},{"duration":1490.1000000014901,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":604.6999999992549,"connectEnd":604.6999999992549,"connectStart":604.6999999992549,"domainLookupEnd":604.6999999992549,"domainLookupStart":604.6999999992549,"fetchStart":604.6999999992549,"redirectEnd":0,"redirectStart":0,"requestStart":604.6999999992549,"responseEnd":2094.800000000745,"responseStart":2094.800000000745,"secureConnectionStart":604.6999999992549},{"duration":550.3000000007451,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1300.699999999255,"connectEnd":1300.699999999255,"connectStart":1300.699999999255,"domainLookupEnd":1300.699999999255,"domainLookupStart":1300.699999999255,"fetchStart":1300.699999999255,"redirectEnd":0,"redirectStart":0,"requestStart":1300.699999999255,"responseEnd":1851,"responseStart":1851,"secureConnectionStart":1300.699999999255},{"duration":440.3999999985099,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1656.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1656.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2096.89999999851,"responseStart":0,"secureConnectionStart":0}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":75,"responseStart":588,"responseEnd":597,"domLoading":592,"domInteractive":2117,"domContentLoadedEventStart":2117,"domContentLoadedEventEnd":2158,"domComplete":3437,"loadEventStart":3437,"loadEventEnd":3439,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2099.10000000149},{"name":"bigPipe.sidebar-id.end","time":2099.800000000745},{"name":"bigPipe.activity-panel-pipe-id.start","time":2100.10000000149},{"name":"bigPipe.activity-panel-pipe-id.end","time":2102.199999999255},{"name":"activityTabFullyLoaded","time":2164.10000000149}],"measures":[],"correlationId":"e9377cc03f43fe","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":451,"dbReadsTimeInMs":15,"dbConnsTimeInMs":23,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}