There are two parts here. The first part affects all versions, while the second part (the crash) is 10.7+. I've set affected versions to all as I expect that the crash is an aftermath of preceding inconsistency; but it really depends on how you want to categorize it, so please change the versions as you deem fit.
The first part is the ALTER being allowed to convert the table into COMPACT format (with a warning). If it's attempted via the explicit ROW_FORMAT=COMPACT, either in CREATE or in ALTER, they fail with an error; but with the implicit default row format it somehow goes through:
10.3 78030b67b9c
ALTERTABLE t FORCE;
Warnings:
Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMICor ROW_FORMAT=COMPRESSED may help. Incurrent row format, BLOB prefix of 768 bytes is stored inline.
SELECT TABLE_NAME, ROW_FORMAT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't';
TABLE_NAME ROW_FORMAT
t Compact
2022-10-15 19:24:54 9 [Warning] InnoDB: Cannot add field `c11` in table `test`.`#sql-10c1e7_9` because after adding it, the row size is 8714 which is greater than maximum allowed size (8126 bytes) for a record on index leaf page.
The following INSERT fails on 10.3-10.6 with ER_TOO_BIG_ROWSIZE, but on 10.7+ it crashes:
10.7 588efca237
#3 <signal handler called>
#4 0x000055d3af5fa1bd in trx_undo_report_row_operation (thr=0x6220000324d8, index=0x616000a29a20, clust_entry=0x6170000846a0, update=0x0, cmpl_info=0, rec=0x0, offsets=0x0, roll_ptr=0x0) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/storage/innobase/trx/trx0rec.cc:2001
#5 0x000055d3af48e3a0 in row_ins_clust_index_entry_low (flags=0, mode=2, index=0x616000a29a20, n_uniq=1, entry=0x6170000846a0, n_ext=0, thr=0x6220000324d8) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/storage/innobase/row/row0ins.cc:2674
#6 0x000055d3af490f0a in row_ins_clust_index_entry (index=0x616000a29a20, entry=0x6170000846a0, thr=0x6220000324d8, n_ext=0) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/storage/innobase/row/row0ins.cc:3168
#7 0x000055d3af491975 in row_ins_index_entry (index=0x616000a29a20, entry=0x6170000846a0, thr=0x6220000324d8) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/storage/innobase/row/row0ins.cc:3305
#8 0x000055d3af4929a8 in row_ins_index_entry_step (node=0x622000032108, thr=0x6220000324d8) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/storage/innobase/row/row0ins.cc:3473
#9 0x000055d3af493359 in row_ins (node=0x622000032108, thr=0x6220000324d8) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/storage/innobase/row/row0ins.cc:3619
#10 0x000055d3af494387 in row_ins_step (thr=0x6220000324d8) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/storage/innobase/row/row0ins.cc:3759
#11 0x000055d3af4da903 in row_insert_for_mysql (mysql_rec=0x6190000f50c8 "", prebuilt=0x6220000319a0, ins_mode=ROW_INS_NORMAL) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/storage/innobase/row/row0mysql.cc:1308
#12 0x000055d3af14f90a in ha_innobase::write_row (this=0x61d0002f94b8, record=0x6190000f50c8 "") at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/storage/innobase/handler/ha_innodb.cc:7906
#13 0x000055d3ae8bdd7b in handler::ha_write_row (this=0x61d0002f94b8, buf=0x6190000f50c8 "") at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/sql/handler.cc:7571
#14 0x000055d3adff2747 in write_record (thd=0x62b00017a218, table=0x6190000f4b98, info=0x7f2c3710bcd0, sink=0x0) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/sql/sql_insert.cc:2190
#15 0x000055d3adfeaf4c in mysql_insert (thd=0x62b00017a218, table_list=0x6290001096a0, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=true, result=0x0) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/sql/sql_insert.cc:1146
#16 0x000055d3ae0a4c6c in mysql_execute_command (thd=0x62b00017a218, is_called_from_prepared_stmt=false) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/sql/sql_parse.cc:4563
#17 0x000055d3ae0bb906 in mysql_parse (thd=0x62b00017a218, rawbuf=0x629000109238 "INSERT IGNORE INTO t VALUES \n(1, REPEAT('x',4805), REPEAT('t',2211), REPEAT('u',974), REPEAT('e',871), REPEAT('z',224), REPEAT('j',978), REPEAT('n',190), REPEAT('t',888), REPEAT('x',32768), REPEAT('e'"..., length=457, parser_state=0x7f2c3710ca20) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/sql/sql_parse.cc:8014
#18 0x000055d3ae094401 in dispatch_command (command=COM_QUERY, thd=0x62b00017a218, packet=0x62900028f219 "INSERT IGNORE INTO t VALUES \n(1, REPEAT('x',4805), REPEAT('t',2211), REPEAT('u',974), REPEAT('e',871), REPEAT('z',224), REPEAT('j',978), REPEAT('n',190), REPEAT('t',888), REPEAT('x',32768), REPEAT('e'"..., packet_length=457, blocking=true) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/sql/sql_parse.cc:1894
#19 0x000055d3ae09188b in do_command (thd=0x62b00017a218, blocking=true) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/sql/sql_parse.cc:1407
#20 0x000055d3ae4bb079 in do_handle_one_connection (connect=0x608000003038, put_in_cache=true) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/sql/sql_connect.cc:1416
#21 0x000055d3ae4baa3a in handle_one_connection (arg=0x608000002fb8) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/sql/sql_connect.cc:1318
#22 0x000055d3aef77726 in pfs_spawn_thread (arg=0x617000007098) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/storage/perfschema/pfs.cc:2201
#23 0x00007f2c47a67ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
#24 0x00007f2c47654aef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Attachments
Issue Links
relates to
MDEV-29761 Bulk insert fails to rollback during insert..select
Alter does give warning when it comes to ALTER..TABLE FORCE or OPTIMIZE TABLE because there is no schema change from user perspective. marko If you have any suggestion then let me know.
Thirunarayanan Balathandayuthapani
added a comment -
/* For ALTER TABLE...FORCE or OPTIMIZE TABLE,
we may only issue warnings, because there will
be no schema change from the user perspective. */
if (!info.row_size_is_acceptable(
*index,
!!(ha_alter_info->handler_flags
& ~(INNOBASE_INPLACE_IGNORE
| INNOBASE_ALTER_NOVALIDATE
| ALTER_RECREATE_TABLE)))) {
error = DB_TOO_BIG_RECORD;
goto error_handling_drop_uncached_1;
}
Alter does give warning when it comes to ALTER..TABLE FORCE or OPTIMIZE TABLE because there is no schema change from user perspective.
marko If you have any suggestion then let me know.
thiru, the warning was intended for a scenario that the user had created a table in non-strict mode and then issues OPTIMIZE TABLE. The test case here is a little more involved, because the InnoDB internal schema is actually being changed from ROW_FORMAT=DYNAMIC to ROW_FORMAT=COMPACT even though no explicit ROW_FORMAT was specified.
I do not think that we can or should do much about the warning.
I would only fix the crash, which is related to MDEV-24621 in 10.7. Ideally we would only reject the oversized row(s), but because the row-level undo logging has been disabled due to MDEV-515, we may have to roll back the entire transaction.
How does 10.6 behave in this case? Already it should be using table-level undo logging here.
Marko Mäkelä
added a comment - thiru , the warning was intended for a scenario that the user had created a table in non-strict mode and then issues OPTIMIZE TABLE . The test case here is a little more involved, because the InnoDB internal schema is actually being changed from ROW_FORMAT=DYNAMIC to ROW_FORMAT=COMPACT even though no explicit ROW_FORMAT was specified.
I do not think that we can or should do much about the warning.
I would only fix the crash, which is related to MDEV-24621 in 10.7. Ideally we would only reject the oversized row(s), but because the row-level undo logging has been disabled due to MDEV-515 , we may have to roll back the entire transaction.
How does 10.6 behave in this case? Already it should be using table-level undo logging here.
10.7+ crash was addressed by MDEV-29761 and added the test case too. I don't see any issue in 10.6 and it behaves as expected.
Thirunarayanan Balathandayuthapani
added a comment - 10.7+ crash was addressed by MDEV-29761 and added the test case too. I don't see any issue in 10.6 and it behaves as expected.
People
Thirunarayanan Balathandayuthapani
Elena Stepanova
Votes:
0Vote for this issue
Watchers:
3Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":2254.5,"ttfb":866.0999999046326,"pageVisibility":"visible","entityId":115592,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"f08c476a-6be1-4e99-b709-adfa8b31d841","navigationType":0,"readyForUser":2363.800000190735,"redirectCount":0,"resourceLoadedEnd":3237.300000190735,"resourceLoadedStart":871.5,"resourceTiming":[{"duration":815.2000002861023,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":871.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":871.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1686.7000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":815.1999998092651,"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":871.8000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":871.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1687,"responseStart":0,"secureConnectionStart":0},{"duration":845.0999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":872,"connectEnd":872,"connectStart":872,"domainLookupEnd":872,"domainLookupStart":872,"fetchStart":872,"redirectEnd":0,"redirectStart":0,"requestStart":872,"responseEnd":1717.0999999046326,"responseStart":1717.0999999046326,"secureConnectionStart":872},{"duration":954.8000001907349,"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":872.0999999046326,"connectEnd":872.0999999046326,"connectStart":872.0999999046326,"domainLookupEnd":872.0999999046326,"domainLookupStart":872.0999999046326,"fetchStart":872.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":872.0999999046326,"responseEnd":1826.9000000953674,"responseStart":1826.9000000953674,"secureConnectionStart":872.0999999046326},{"duration":958.6999998092651,"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":872.3000001907349,"connectEnd":872.3000001907349,"connectStart":872.3000001907349,"domainLookupEnd":872.3000001907349,"domainLookupStart":872.3000001907349,"fetchStart":872.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":872.3000001907349,"responseEnd":1831,"responseStart":1831,"secureConnectionStart":872.3000001907349},{"duration":958.9000000953674,"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":872.5999999046326,"connectEnd":872.5999999046326,"connectStart":872.5999999046326,"domainLookupEnd":872.5999999046326,"domainLookupStart":872.5999999046326,"fetchStart":872.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":872.5999999046326,"responseEnd":1831.5,"responseStart":1831.5,"secureConnectionStart":872.5999999046326},{"duration":959.0999999046326,"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":872.8000001907349,"connectEnd":872.8000001907349,"connectStart":872.8000001907349,"domainLookupEnd":872.8000001907349,"domainLookupStart":872.8000001907349,"fetchStart":872.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":872.8000001907349,"responseEnd":1831.9000000953674,"responseStart":1831.9000000953674,"secureConnectionStart":872.8000001907349},{"duration":995.5,"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":873,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":873,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1868.5,"responseStart":0,"secureConnectionStart":0},{"duration":959.3000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":873.0999999046326,"connectEnd":873.0999999046326,"connectStart":873.0999999046326,"domainLookupEnd":873.0999999046326,"domainLookupStart":873.0999999046326,"fetchStart":873.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":873.0999999046326,"responseEnd":1832.4000000953674,"responseStart":1832.4000000953674,"secureConnectionStart":873.0999999046326},{"duration":995.5999999046326,"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":873.3000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":873.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1868.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":959.5999999046326,"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":873.4000000953674,"connectEnd":873.4000000953674,"connectStart":873.4000000953674,"domainLookupEnd":873.4000000953674,"domainLookupStart":873.4000000953674,"fetchStart":873.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":873.4000000953674,"responseEnd":1833,"responseStart":1833,"secureConnectionStart":873.4000000953674},{"duration":2357.5999999046326,"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":879.3000001907349,"connectEnd":879.3000001907349,"connectStart":879.3000001907349,"domainLookupEnd":879.3000001907349,"domainLookupStart":879.3000001907349,"fetchStart":879.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":879.3000001907349,"responseEnd":3236.9000000953674,"responseStart":3236.9000000953674,"secureConnectionStart":879.3000001907349},{"duration":2357.9000000953674,"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":879.4000000953674,"connectEnd":879.4000000953674,"connectStart":879.4000000953674,"domainLookupEnd":879.4000000953674,"domainLookupStart":879.4000000953674,"fetchStart":879.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":879.4000000953674,"responseEnd":3237.300000190735,"responseStart":3237.300000190735,"secureConnectionStart":879.4000000953674},{"duration":1023.3000001907349,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1880.9000000953674,"connectEnd":1880.9000000953674,"connectStart":1880.9000000953674,"domainLookupEnd":1880.9000000953674,"domainLookupStart":1880.9000000953674,"fetchStart":1880.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":1880.9000000953674,"responseEnd":2904.2000002861023,"responseStart":2904.2000002861023,"secureConnectionStart":1880.9000000953674},{"duration":996,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":2247.300000190735,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":2247.300000190735,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":3243.300000190735,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":683,"responseStart":866,"responseEnd":875,"domLoading":869,"domInteractive":3291,"domContentLoadedEventStart":3291,"domContentLoadedEventEnd":3344,"domComplete":4421,"loadEventStart":4421,"loadEventEnd":4422,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":3246.2000002861023},{"name":"bigPipe.sidebar-id.end","time":3247},{"name":"bigPipe.activity-panel-pipe-id.start","time":3247.2000002861023},{"name":"bigPipe.activity-panel-pipe-id.end","time":3248.9000000953674},{"name":"activityTabFullyLoaded","time":3375.300000190735}],"measures":[],"correlationId":"4128c01b3b8442","effectiveType":"4g","downlink":9.3,"rtt":0,"serverDuration":114,"dbReadsTimeInMs":12,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
/* For ALTER TABLE...FORCE or OPTIMIZE TABLE,
we may only issue warnings, because there will
be no schema change from the user perspective. */
if (!info.row_size_is_acceptable(
*index,
!!(ha_alter_info->handler_flags
& ~(INNOBASE_INPLACE_IGNORE
| INNOBASE_ALTER_NOVALIDATE
| ALTER_RECREATE_TABLE)))) {
error = DB_TOO_BIG_RECORD;
goto error_handling_drop_uncached_1;
}
Alter does give warning when it comes to ALTER..TABLE FORCE or OPTIMIZE TABLE because there is no schema change from user perspective.
marko If you have any suggestion then let me know.