In MTR the one-line test can be run normally (as MTR already runs without InnoDB by default); upon using the client, start the server with --default-storage-engine=MyISAM --skip-innodb
SELECT * FROM information_schema.KEY_PERIOD_USAGE;
11.3 e6f224533a56e209930cdb10bf19a475d1cd4fd6
#3 <signal handler called>
#4 get_schema_key_period_usage_record (thd=0x7f24a4000dc8, tables=0x7f24a4208360, schema_table=0x7f24a4228750, res=true, db_name=0x7f24a41184d8, table_name=0x7f24a411aa60) at /data/src/preview-11.3-MDEV-22597-period/sql/sql_show.cc:7729
#5 0x00005643574a58b3 in fill_schema_table_by_open (thd=0x7f24a4000dc8, mem_root=0x7f24b6139830, is_show_fields_or_keys=false, table=0x7f24a4228750, schema_table=0x564359981d20 <schema_tables+1344>, orig_db_name=0x7f24a41184d8, orig_table_name=0x7f24a411aa60, open_tables_state_backup=0x7f24b6139870, can_deadlock=false) at /data/src/preview-11.3-MDEV-22597-period/sql/sql_show.cc:4794
#6 0x00005643574a8ed3 in get_all_tables (thd=0x7f24a4000dc8, tables=0x7f24a4015f48, cond=0x0) at /data/src/preview-11.3-MDEV-22597-period/sql/sql_show.cc:5472
#7 0x00005643574ca4c6 in get_schema_tables_result (join=0x7f24a4017388, executed_place=PROCESSED_BY_JOIN_EXEC) at /data/src/preview-11.3-MDEV-22597-period/sql/sql_show.cc:9294
#8 0x00005643573e4b1d in JOIN::exec_inner (this=0x7f24a4017388) at /data/src/preview-11.3-MDEV-22597-period/sql/sql_select.cc:4898
#9 0x00005643573e33c7 in JOIN::exec (this=0x7f24a4017388) at /data/src/preview-11.3-MDEV-22597-period/sql/sql_select.cc:4718
#10 0x00005643573e6721 in mysql_select (thd=0x7f24a4000dc8, tables=0x7f24a4015f48, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2701396736, result=0x7f24a4017360, unit=0x7f24a4005218, select_lex=0x7f24a40158f0) at /data/src/preview-11.3-MDEV-22597-period/sql/sql_select.cc:5249
#11 0x00005643573c595b in handle_select (thd=0x7f24a4000dc8, lex=0x7f24a4005138, result=0x7f24a4017360, setup_tables_done_option=0) at /data/src/preview-11.3-MDEV-22597-period/sql/sql_select.cc:628
#12 0x0000564357316a3f in execute_sqlcom_select (thd=0x7f24a4000dc8, all_tables=0x7f24a4015f48) at /data/src/preview-11.3-MDEV-22597-period/sql/sql_parse.cc:6012
#13 0x00005643573050b7 in mysql_execute_command (thd=0x7f24a4000dc8, is_called_from_prepared_stmt=false) at /data/src/preview-11.3-MDEV-22597-period/sql/sql_parse.cc:3911
#14 0x000056435731ffd9 in mysql_parse (thd=0x7f24a4000dc8, rawbuf=0x7f24a4015830 "SELECT * FROM information_schema.KEY_PERIOD_USAGE", length=49, parser_state=0x7f24b613b330) at /data/src/preview-11.3-MDEV-22597-period/sql/sql_parse.cc:7734
#15 0x00005643572f8344 in dispatch_command (command=COM_QUERY, thd=0x7f24a4000dc8, packet=0x7f24a400bc19 "SELECT * FROM information_schema.KEY_PERIOD_USAGE", packet_length=49, blocking=true) at /data/src/preview-11.3-MDEV-22597-period/sql/sql_parse.cc:1893
#16 0x00005643572f5465 in do_command (thd=0x7f24a4000dc8, blocking=true) at /data/src/preview-11.3-MDEV-22597-period/sql/sql_parse.cc:1406
#17 0x000056435769414b in do_handle_one_connection (connect=0x56435c575788, put_in_cache=true) at /data/src/preview-11.3-MDEV-22597-period/sql/sql_connect.cc:1445
#18 0x0000564357693b76 in handle_one_connection (arg=0x56435c5b59a8) at /data/src/preview-11.3-MDEV-22597-period/sql/sql_connect.cc:1347
#19 0x0000564357ff55af in pfs_spawn_thread (arg=0x56435c5752f8) at /data/src/preview-11.3-MDEV-22597-period/storage/perfschema/pfs.cc:2201
#20 0x00007f24bb6a7fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#21 0x00007f24bb7285bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
Attachments
Issue Links
is caused by
MDEV-22597Add views for periods in information_schema
Closed
is duplicated by
MDEV-32204Server crashes in get_schema_key_period_usage_record
Nikita Malyavin
added a comment - A devil jerked my hand to make a refactoring, that should prevent such kind of errors in future.
Please review the following commits:
0929cbbb MDEV-32205 crash in get_schema_key_period_usage_record without InnoDB
0e709489 Add Statement::sql_command_flags() function.
pretty good. 0e709489 is ok. questions about 0929cbbb:
could you take a quick look in if there were other I_S tables that didn't handle the open error? If yes — add tests for them too.
why do you get "Unknown storage engine 'InnoDB'" ? What does the test has to do with InnoDB?
Sergei Golubchik
added a comment - pretty good. 0e709489 is ok. questions about 0929cbbb :
could you take a quick look in if there were other I_S tables that didn't handle the open error? If yes — add tests for them too.
why do you get "Unknown storage engine 'InnoDB'" ? What does the test has to do with InnoDB?
serg,
> why do you get "Unknown storage engine 'InnoDB'" ? What does the test has to do with InnoDB?
get_al_tables traverses all the tables and opens it. If the server was started without innodb, the innodb-backed table will not open, and an unknown storage engine error will be set in stmt_da.
Nikita Malyavin
added a comment - - edited serg ,
> why do you get "Unknown storage engine 'InnoDB'" ? What does the test has to do with InnoDB?
get_al_tables traverses all the tables and opens it. If the server was started without innodb, the innodb-backed table will not open, and an unknown storage engine error will be set in stmt_da.
select table_schema, table_name, storage_engine from information_schema.tables
to your test at the beginning to show that there is an InnoDB table somewhere
Sergei Golubchik
added a comment - ok, please add something like
select table_schema, table_name, storage_engine from information_schema.tables
to your test at the beginning to show that there is an InnoDB table somewhere
> could you take a quick look in if there were other I_S tables that didn't handle the open error? If yes — add tests for them too.
I have run select on all the tables in the schema_tables array – no problems.
Also I forgot to remove an error check from GEOMETRY_COLUMNS, which also uses get_all_tables (the new commit is 908ca080e).
The rest of the plugin doesn't make sense to check, since they use different approaches for filling the data.
Nikita Malyavin
added a comment - > could you take a quick look in if there were other I_S tables that didn't handle the open error? If yes — add tests for them too.
I have run select on all the tables in the schema_tables array – no problems.
Also I forgot to remove an error check from GEOMETRY_COLUMNS, which also uses get_all_tables (the new commit is 908ca080e ).
The rest of the plugin doesn't make sense to check, since they use different approaches for filling the data.
People
Nikita Malyavin
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":909.5999994277954,"ttfb":323.69999980926514,"pageVisibility":"visible","entityId":125140,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"ba8cf032-5944-4689-ab6a-3e44be5b6b41","navigationType":0,"readyForUser":987.5999994277954,"redirectCount":0,"resourceLoadedEnd":590.6999998092651,"resourceLoadedStart":329.3999996185303,"resourceTiming":[{"duration":9.399999618530273,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":329.3999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":329.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":338.79999923706055,"responseStart":0,"secureConnectionStart":0},{"duration":9.800000190734863,"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":329.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":329.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":339.5,"responseStart":0,"secureConnectionStart":0},{"duration":177.9000005722046,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":329.79999923706055,"connectEnd":329.79999923706055,"connectStart":329.79999923706055,"domainLookupEnd":329.79999923706055,"domainLookupStart":329.79999923706055,"fetchStart":329.79999923706055,"redirectEnd":0,"redirectStart":0,"requestStart":342,"responseEnd":507.69999980926514,"responseStart":356.8999996185303,"secureConnectionStart":329.79999923706055},{"duration":260.80000019073486,"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":329.8999996185303,"connectEnd":329.8999996185303,"connectStart":329.8999996185303,"domainLookupEnd":329.8999996185303,"domainLookupStart":329.8999996185303,"fetchStart":329.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":344.5,"responseEnd":590.6999998092651,"responseStart":367.19999980926514,"secureConnectionStart":329.8999996185303},{"duration":12,"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":330.0999994277954,"connectEnd":330.0999994277954,"connectStart":330.0999994277954,"domainLookupEnd":330.0999994277954,"domainLookupStart":330.0999994277954,"fetchStart":330.0999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":330.0999994277954,"responseEnd":342.0999994277954,"responseStart":342.0999994277954,"secureConnectionStart":330.0999994277954},{"duration":12.899999618530273,"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":330.19999980926514,"connectEnd":330.19999980926514,"connectStart":330.19999980926514,"domainLookupEnd":330.19999980926514,"domainLookupStart":330.19999980926514,"fetchStart":330.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":330.19999980926514,"responseEnd":343.0999994277954,"responseStart":343.0999994277954,"secureConnectionStart":330.19999980926514},{"duration":13.59999942779541,"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":330.19999980926514,"connectEnd":330.19999980926514,"connectStart":330.19999980926514,"domainLookupEnd":330.19999980926514,"domainLookupStart":330.19999980926514,"fetchStart":330.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":330.19999980926514,"responseEnd":343.79999923706055,"responseStart":343.79999923706055,"secureConnectionStart":330.19999980926514},{"duration":14.200000762939453,"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":330.29999923706055,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":330.29999923706055,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":344.5,"responseStart":0,"secureConnectionStart":0},{"duration":15.100000381469727,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":330.3999996185303,"connectEnd":330.3999996185303,"connectStart":330.3999996185303,"domainLookupEnd":330.3999996185303,"domainLookupStart":330.3999996185303,"fetchStart":330.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":330.3999996185303,"responseEnd":345.5,"responseStart":345.5,"secureConnectionStart":330.3999996185303},{"duration":15.59999942779541,"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":330.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":330.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":346.0999994277954,"responseStart":0,"secureConnectionStart":0},{"duration":16.5,"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":330.5999994277954,"connectEnd":330.5999994277954,"connectStart":330.5999994277954,"domainLookupEnd":330.5999994277954,"domainLookupStart":330.5999994277954,"fetchStart":330.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":330.5999994277954,"responseEnd":347.0999994277954,"responseStart":347.0999994277954,"secureConnectionStart":330.5999994277954},{"duration":34.89999961853027,"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":331.3999996185303,"connectEnd":331.3999996185303,"connectStart":331.3999996185303,"domainLookupEnd":331.3999996185303,"domainLookupStart":331.3999996185303,"fetchStart":331.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":331.3999996185303,"responseEnd":366.29999923706055,"responseStart":366.19999980926514,"secureConnectionStart":331.3999996185303},{"duration":42.29999923706055,"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":331.5,"connectEnd":331.5,"connectStart":331.5,"domainLookupEnd":331.5,"domainLookupStart":331.5,"fetchStart":331.5,"redirectEnd":0,"redirectStart":0,"requestStart":331.5,"responseEnd":373.79999923706055,"responseStart":373.79999923706055,"secureConnectionStart":331.5},{"duration":219.10000038146973,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":705.5999994277954,"connectEnd":705.5999994277954,"connectStart":705.5999994277954,"domainLookupEnd":705.5999994277954,"domainLookupStart":705.5999994277954,"fetchStart":705.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":889.7999992370605,"responseEnd":924.6999998092651,"responseStart":923.8999996185303,"secureConnectionStart":705.5999994277954},{"duration":193.19999980926514,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":887.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":887.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1080.6999998092651,"responseStart":0,"secureConnectionStart":0}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":110,"responseStart":324,"responseEnd":327,"domLoading":327,"domInteractive":1093,"domContentLoadedEventStart":1093,"domContentLoadedEventEnd":1139,"domComplete":1753,"loadEventStart":1753,"loadEventEnd":1754,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1066.7999992370605},{"name":"bigPipe.sidebar-id.end","time":1067.6999998092651},{"name":"bigPipe.activity-panel-pipe-id.start","time":1067.7999992370605},{"name":"bigPipe.activity-panel-pipe-id.end","time":1069.8999996185303},{"name":"activityTabFullyLoaded","time":1159.5999994277954}],"measures":[],"correlationId":"4214a10d45c724","effectiveType":"4g","downlink":9.9,"rtt":0,"serverDuration":101,"dbReadsTimeInMs":12,"dbConnsTimeInMs":23,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
A devil jerked my hand to make a refactoring, that should prevent such kind of errors in future.
Please review the following commits:
0929cbbb MDEV-32205 crash in get_schema_key_period_usage_record without InnoDB
0e709489 Add Statement::sql_command_flags() function.