While the join_cache_level variable is set to a value > 2, a query with a join on a derived table with a TEXT column in it could result to a server crash when LIMIT x OFFSET x is used on the derived table.
To reproduce the crash, import the attached SQL then execute the following query :
EXPLAIN SELECT 1 FROM (SELECT url, id FROM t2 LIMIT 1 OFFSET 20) derived RIGHT JOIN t1 ON t1.id = derived.id;
|
Here is the error log output :
mysqld: 130919 14:11:26 [ERROR] mysqld got signal 11 ;
|
mysqld: This could be because you hit a bug. It is also possible that this binary
|
mysqld: or one of the libraries it was linked against is corrupt, improperly built,
|
mysqld: or misconfigured. This error can also be caused by malfunctioning hardware.
|
mysqld:
|
mysqld: To report this bug, see http://kb.askmonty.org/en/reporting-bugs
|
mysqld:
|
mysqld: We will try our best to scrape up some info that will hopefully help
|
mysqld: diagnose the problem, but since we have already crashed,
|
mysqld: something is definitely wrong and this may fail.
|
mysqld:
|
mysqld: Server version: 5.5.33-MariaDB-1~squeeze
|
mysqld: key_buffer_size=2147483648
|
mysqld: read_buffer_size=2097152
|
mysqld: max_used_connections=1
|
mysqld: max_threads=252
|
mysqld: thread_count=1
|
mysqld: It is possible that mysqld could use up to
|
mysqld: key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 3133826 K bytes of memory
|
mysqld: Hope that's ok; if not, decrease some variables in the equation.
|
mysqld:
|
mysqld: Thread pointer: 0x0x7fb69bcfb5f0
|
mysqld: Attempting backtrace. You can use the following information to find out
|
mysqld: where mysqld died. If you see no messages after this, something went
|
mysqld: terribly wrong...
|
mysqld: stack_bottom = 0x7fb37714ae58 thread_stack 0x48000
|
mysqld: /usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x7fb69035d80e]
|
mysqld: /usr/sbin/mysqld(handle_fatal_signal+0x4ac)[0x7fb68ff5cd7c]
|
mysqld: /lib/libpthread.so.0(+0xeff0)[0x7fb68f659ff0]
|
mysqld: /usr/sbin/mysqld(_ZN10DsMrr_impl15choose_mrr_implEjyPjS0_P9COST_VECT+0x54)[0x7fb68feff724]
|
mysqld: /usr/sbin/mysqld(_ZN10DsMrr_impl10dsmrr_infoEjjjjPjS0_P9COST_VECT+0xe3)[0x7fb68feffad3]
|
mysqld: /usr/sbin/mysqld(_Z33check_join_cache_usage_for_tablesP4JOINyj+0x694)[0x7fb68fe40ed4]
|
mysqld: /usr/sbin/mysqld(_ZN4JOIN8optimizeEv+0x16c7)[0x7fb68fe4f477]
|
mysqld: /usr/sbin/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0xd2)[0x7fb68fe568e2]
|
mysqld: /usr/sbin/mysqld(_Z19mysql_explain_unionP3THDP18st_select_lex_unitP13select_result+0x10c)[0x7fb68fe5726c]
|
mysqld: /usr/sbin/mysqld(+0x37771f)[0x7fb68fdfe71f]
|
mysqld: /usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x35f9)[0x7fb68fe05539]
|
mysqld: /usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x1cc)[0x7fb68fe080ec]
|
mysqld: /usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x1792)[0x7fb68fe09892]
|
mysqld: /usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x419)[0x7fb68fece809]
|
mysqld: /usr/sbin/mysqld(handle_one_connection+0x51)[0x7fb68fece8c1]
|
mysqld: /lib/libpthread.so.0(+0x68ca)[0x7fb68f6518ca]
|
mysqld: /lib/libc.so.6(clone+0x6d)[0x7fb68dfd0b6d]
|
mysqld:
|
mysqld: Trying to get some variables.
|
mysqld: Some pointers may be invalid and cause the dump to abort.
|
mysqld: Query (0x7fb69bd467f8): EXPLAIN SELECT 1 FROM (SELECT url, id FROM t2 LIMIT 1 OFFSET 20) derived RIGHT JOIN t1 ON t1.id = derived.id
|
mysqld:
|
mysqld: Connection ID (thread ID): 1
|
mysqld: Status: NOT_KILLED
|
mysqld:
|
mysqld: Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
mysqld:
|
mysqld: The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
|
mysqld: information that should help you find out what is causing the crash.
|
mysqld_safe: Number of processes running now: 0
|
mysqld_safe: mysqld restarted
|
{"report":{"fcp":1220.8000001907349,"ttfb":203.20000076293945,"pageVisibility":"visible","entityId":25726,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"00ca8461-ea00-4de8-a0dd-4881686dcf1f","navigationType":0,"readyForUser":1311.6000003814697,"redirectCount":0,"resourceLoadedEnd":1477.4000005722046,"resourceLoadedStart":208.4000005722046,"resourceTiming":[{"duration":536.5999994277954,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":208.4000005722046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":208.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":745,"responseStart":0,"secureConnectionStart":0},{"duration":536.5999994277954,"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":208.70000076293945,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":208.70000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":745.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":546.3000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":208.9000005722046,"connectEnd":208.9000005722046,"connectStart":208.9000005722046,"domainLookupEnd":208.9000005722046,"domainLookupStart":208.9000005722046,"fetchStart":208.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":208.9000005722046,"responseEnd":755.2000007629395,"responseStart":755.2000007629395,"secureConnectionStart":208.9000005722046},{"duration":572.1999998092651,"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":209.10000038146973,"connectEnd":209.10000038146973,"connectStart":209.10000038146973,"domainLookupEnd":209.10000038146973,"domainLookupStart":209.10000038146973,"fetchStart":209.10000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":209.10000038146973,"responseEnd":781.3000001907349,"responseStart":781.3000001907349,"secureConnectionStart":209.10000038146973},{"duration":576.1000003814697,"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":209.30000019073486,"connectEnd":209.30000019073486,"connectStart":209.30000019073486,"domainLookupEnd":209.30000019073486,"domainLookupStart":209.30000019073486,"fetchStart":209.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":209.30000019073486,"responseEnd":785.4000005722046,"responseStart":785.4000005722046,"secureConnectionStart":209.30000019073486},{"duration":576.5,"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":209.5,"connectEnd":209.5,"connectStart":209.5,"domainLookupEnd":209.5,"domainLookupStart":209.5,"fetchStart":209.5,"redirectEnd":0,"redirectStart":0,"requestStart":209.5,"responseEnd":786,"responseStart":786,"secureConnectionStart":209.5},{"duration":576.5,"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":209.80000019073486,"connectEnd":209.80000019073486,"connectStart":209.80000019073486,"domainLookupEnd":209.80000019073486,"domainLookupStart":209.80000019073486,"fetchStart":209.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":209.80000019073486,"responseEnd":786.3000001907349,"responseStart":786.3000001907349,"secureConnectionStart":209.80000019073486},{"duration":712.2000007629395,"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":210,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":210,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":922.2000007629395,"responseStart":0,"secureConnectionStart":0},{"duration":576.6999998092651,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":210.10000038146973,"connectEnd":210.10000038146973,"connectStart":210.10000038146973,"domainLookupEnd":210.10000038146973,"domainLookupStart":210.10000038146973,"fetchStart":210.10000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":210.10000038146973,"responseEnd":786.8000001907349,"responseStart":786.8000001907349,"secureConnectionStart":210.10000038146973},{"duration":712,"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":210.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":210.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":922.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":577,"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":210.4000005722046,"connectEnd":210.4000005722046,"connectStart":210.4000005722046,"domainLookupEnd":210.4000005722046,"domainLookupStart":210.4000005722046,"fetchStart":210.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":210.4000005722046,"responseEnd":787.4000005722046,"responseStart":787.4000005722046,"secureConnectionStart":210.4000005722046},{"duration":850.6000003814697,"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":216.10000038146973,"connectEnd":216.10000038146973,"connectStart":216.10000038146973,"domainLookupEnd":216.10000038146973,"domainLookupStart":216.10000038146973,"fetchStart":216.10000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":216.10000038146973,"responseEnd":1066.7000007629395,"responseStart":1066.7000007629395,"secureConnectionStart":216.10000038146973},{"duration":1261.1999998092651,"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":216.20000076293945,"connectEnd":216.20000076293945,"connectStart":216.20000076293945,"domainLookupEnd":216.20000076293945,"domainLookupStart":216.20000076293945,"fetchStart":216.20000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":216.20000076293945,"responseEnd":1477.4000005722046,"responseStart":1477.4000005722046,"secureConnectionStart":216.20000076293945},{"duration":466.20000076293945,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1008,"connectEnd":1008,"connectStart":1008,"domainLookupEnd":1008,"domainLookupStart":1008,"fetchStart":1008,"redirectEnd":0,"redirectStart":0,"requestStart":1008,"responseEnd":1474.2000007629395,"responseStart":1474.2000007629395,"secureConnectionStart":1008}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":37,"responseStart":203,"responseEnd":211,"domLoading":206,"domInteractive":1502,"domContentLoadedEventStart":1502,"domContentLoadedEventEnd":1543,"domComplete":2723,"loadEventStart":2723,"loadEventEnd":2725,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1483.5},{"name":"bigPipe.sidebar-id.end","time":1484.4000005722046},{"name":"bigPipe.activity-panel-pipe-id.start","time":1484.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1486.8000001907349},{"name":"activityTabFullyLoaded","time":1550.9000005722046}],"measures":[],"correlationId":"22d5a784de389e","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":96,"dbReadsTimeInMs":10,"dbConnsTimeInMs":18,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}