CREATE TABLE t1 (a INT);
|
LOCK TABLE t1 WRITE;
|
CREATE TABLE IF NOT EXISTS t1 (s DATE GENERATED ALWAYS AS ('2000-01-01') STORED, e DATE, PERIOD FOR app(s,e));
|
|
# Cleanup
|
DROP TABLE t1;
|
10.4 c24ec3ce
|
mysqld: /data/src/10.4/sql/sql_error.cc:335: void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*): Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed.
|
191108 19:59:17 [ERROR] mysqld got signal 6 ;
|
|
#7 0x00007fc54ddd7f12 in __GI___assert_fail (assertion=0x561293cbc620 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=0x561293cbc568 "/data/src/10.4/sql/sql_error.cc", line=335, function=0x561293cbc960 <Diagnostics_area::set_ok_status(unsigned long long, unsigned long long, char const*)::__PRETTY_FUNCTION__> "void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*)") at assert.c:101
|
#8 0x0000561292f7af48 in Diagnostics_area::set_ok_status (this=0x7fc5340064c0, affected_rows=0, last_insert_id=0, message=0x0) at /data/src/10.4/sql/sql_error.cc:335
|
#9 0x0000561292f1f17e in my_ok (thd=0x7fc534000af0, affected_rows_arg=0, id=0, message=0x0) at /data/src/10.4/sql/sql_class.h:5009
|
#10 0x00005612930c6bac in Sql_cmd_create_table_like::execute (this=0x7fc534013278, thd=0x7fc534000af0) at /data/src/10.4/sql/sql_table.cc:11446
|
#11 0x0000561292fd9466 in mysql_execute_command (thd=0x7fc534000af0) at /data/src/10.4/sql/sql_parse.cc:6099
|
#12 0x0000561292fdeb29 in mysql_parse (thd=0x7fc534000af0, rawbuf=0x7fc534013138 "CREATE TABLE IF NOT EXISTS t1 (s DATE GENERATED ALWAYS AS ('2000-01-01') STORED, e DATE, PERIOD FOR app(s,e))", length=109, parser_state=0x7fc543f68170, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7898
|
#13 0x0000561292fc9d06 in dispatch_command (command=COM_QUERY, thd=0x7fc534000af0, packet=0x7fc534008341 "CREATE TABLE IF NOT EXISTS t1 (s DATE GENERATED ALWAYS AS ('2000-01-01') STORED, e DATE, PERIOD FOR app(s,e))", packet_length=109, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1842
|
#14 0x0000561292fc8393 in do_command (thd=0x7fc534000af0) at /data/src/10.4/sql/sql_parse.cc:1360
|
#15 0x000056129315025b in do_handle_one_connection (connect=0x561296950e60) at /data/src/10.4/sql/sql_connect.cc:1412
|
#16 0x000056129314ffaa in handle_one_connection (arg=0x561296950e60) at /data/src/10.4/sql/sql_connect.cc:1316
|
#17 0x0000561293b53b15 in pfs_spawn_thread (arg=0x5612968756c0) at /data/src/10.4/storage/perfschema/pfs.cc:1862
|
#18 0x00007fc54f94d4a4 in start_thread (arg=0x7fc543f69700) at pthread_create.c:456
|
#19 0x00007fc54de94d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
|
Reproducible on 10.4, 10.5. The test case is not applicable to previous versions, although it's possible that the problem isn't limited to application periods.
Non-debug version doesn't crash, it only produces the error:
mysqltest: At line 3: query 'CREATE TABLE IF NOT EXISTS t1 (s DATE GENERATED ALWAYS AS ('2000-01-01') STORED, e DATE, PERIOD FOR app(s,e))' failed: 4155: Period field `s` cannot be GENERATED ALWAYS AS
|
The error itself isn't wrong, however the question is whether CREATE should even go that far, given that the table already exists.
- relates to
-
MDEV-21058
CREATE TABLE with generated column and RLIKE results in sigabrt
-
-
Closed
{"report":{"fcp":1049.3000001907349,"ttfb":245,"pageVisibility":"visible","entityId":80291,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"12ea1ef4-fe3a-4c27-abb2-79918173aac7","navigationType":0,"readyForUser":1150.3000001907349,"redirectCount":0,"resourceLoadedEnd":1274.5,"resourceLoadedStart":250.7000002861023,"resourceTiming":[{"duration":305.3999996185303,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":250.7000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":250.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":556.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":305.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":251,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":251,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":556.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":314.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":251.09999990463257,"connectEnd":251.09999990463257,"connectStart":251.09999990463257,"domainLookupEnd":251.09999990463257,"domainLookupStart":251.09999990463257,"fetchStart":251.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":251.09999990463257,"responseEnd":565.4000000953674,"responseStart":565.4000000953674,"secureConnectionStart":251.09999990463257},{"duration":359,"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":251.30000019073486,"connectEnd":251.30000019073486,"connectStart":251.30000019073486,"domainLookupEnd":251.30000019073486,"domainLookupStart":251.30000019073486,"fetchStart":251.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":251.30000019073486,"responseEnd":610.3000001907349,"responseStart":610.3000001907349,"secureConnectionStart":251.30000019073486},{"duration":362.6000003814697,"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":251.59999990463257,"connectEnd":251.59999990463257,"connectStart":251.59999990463257,"domainLookupEnd":251.59999990463257,"domainLookupStart":251.59999990463257,"fetchStart":251.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":251.59999990463257,"responseEnd":614.2000002861023,"responseStart":614.2000002861023,"secureConnectionStart":251.59999990463257},{"duration":363,"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":251.80000019073486,"connectEnd":251.80000019073486,"connectStart":251.80000019073486,"domainLookupEnd":251.80000019073486,"domainLookupStart":251.80000019073486,"fetchStart":251.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":251.80000019073486,"responseEnd":614.8000001907349,"responseStart":614.8000001907349,"secureConnectionStart":251.80000019073486},{"duration":363.30000019073486,"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":251.90000009536743,"connectEnd":251.90000009536743,"connectStart":251.90000009536743,"domainLookupEnd":251.90000009536743,"domainLookupStart":251.90000009536743,"fetchStart":251.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":251.90000009536743,"responseEnd":615.2000002861023,"responseStart":615.2000002861023,"secureConnectionStart":251.90000009536743},{"duration":459.2000002861023,"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":252.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":252.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":711.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":363.2999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":252.30000019073486,"connectEnd":252.30000019073486,"connectStart":252.30000019073486,"domainLookupEnd":252.30000019073486,"domainLookupStart":252.30000019073486,"fetchStart":252.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":252.30000019073486,"responseEnd":615.5999999046326,"responseStart":615.5999999046326,"secureConnectionStart":252.30000019073486},{"duration":459,"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":252.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":252.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":711.5,"responseStart":0,"secureConnectionStart":0},{"duration":363.6000003814697,"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":252.59999990463257,"connectEnd":252.59999990463257,"connectStart":252.59999990463257,"domainLookupEnd":252.59999990463257,"domainLookupStart":252.59999990463257,"fetchStart":252.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":252.59999990463257,"responseEnd":616.2000002861023,"responseStart":616.2000002861023,"secureConnectionStart":252.59999990463257},{"duration":662.2000002861023,"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":253.5,"connectEnd":253.5,"connectStart":253.5,"domainLookupEnd":253.5,"domainLookupStart":253.5,"fetchStart":253.5,"redirectEnd":0,"redirectStart":0,"requestStart":253.5,"responseEnd":915.7000002861023,"responseStart":915.7000002861023,"secureConnectionStart":253.5},{"duration":1016.5999999046326,"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":257.90000009536743,"connectEnd":257.90000009536743,"connectStart":257.90000009536743,"domainLookupEnd":257.90000009536743,"domainLookupStart":257.90000009536743,"fetchStart":257.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":257.90000009536743,"responseEnd":1274.5,"responseStart":1274.5,"secureConnectionStart":257.90000009536743},{"duration":191.59999990463257,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":724.9000000953674,"connectEnd":724.9000000953674,"connectStart":724.9000000953674,"domainLookupEnd":724.9000000953674,"domainLookupStart":724.9000000953674,"fetchStart":724.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":724.9000000953674,"responseEnd":916.5,"responseStart":916.5,"secureConnectionStart":724.9000000953674},{"duration":347.7000002861023,"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&whisper-enabled=true","startTime":1000.0999999046326,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1000.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1347.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":323.2000002861023,"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&whisper-enabled=true","startTime":1001,"connectEnd":1001,"connectStart":1001,"domainLookupEnd":1001,"domainLookupStart":1001,"fetchStart":1001,"redirectEnd":0,"redirectStart":0,"requestStart":1001,"responseEnd":1324.2000002861023,"responseStart":1324.2000002861023,"secureConnectionStart":1001},{"duration":329.69999980926514,"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&whisper-enabled=true","startTime":1001.4000000953674,"connectEnd":1001.4000000953674,"connectStart":1001.4000000953674,"domainLookupEnd":1001.4000000953674,"domainLookupStart":1001.4000000953674,"fetchStart":1001.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":1001.4000000953674,"responseEnd":1331.0999999046326,"responseStart":1331.0999999046326,"secureConnectionStart":1001.4000000953674}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":90,"responseStart":245,"responseEnd":249,"domLoading":248,"domInteractive":1295,"domContentLoadedEventStart":1295,"domContentLoadedEventEnd":1348,"domComplete":2003,"loadEventStart":2003,"loadEventEnd":2003,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1276.3000001907349},{"name":"bigPipe.sidebar-id.end","time":1277.2000002861023},{"name":"bigPipe.activity-panel-pipe-id.start","time":1277.4000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":1278.7000002861023},{"name":"activityTabFullyLoaded","time":1365.0999999046326}],"measures":[],"correlationId":"92dd06405fa827","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":94,"dbReadsTimeInMs":10,"dbConnsTimeInMs":18,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
We get this error while checking field. The error is correct because we check if the table already exists in mysql_create_table() while creating the table and fields are checked before creating the table.