Type:
Bug
Priority:
Critical
Resolution:
Duplicate
Affects Version/s:
5.5(EOL) , 10.0(EOL) , 10.1(EOL) , 10.2(EOL) , 10.3(EOL)
Note: this is a spin-off of MDEV-15492 .
--source include/have_innodb.inc
SET @qcs.save= @@ global .query_cache_size, @qct.save= @@ global .query_cache_type;
SET GLOBAL query_cache_size= 512*1024*1024, query_cache_type= ON ;
--connect (con1,localhost,root,,test)
CREATE TABLE t1 (a INT ) ENGINE=InnoDB;
CREATE TABLE t2 (b INT ) ENGINE=InnoDB;
CREATE VIEW v AS select a from t1 join t2;
PREPARE stmt FROM "SELECT * FROM t1 WHERE a in (SELECT a FROM v)" ;
--connect (con2,localhost,root,,test)
PREPARE stmt FROM "SELECT * FROM t1 WHERE a in (SELECT a FROM v)" ;
EXECUTE stmt;
--connection con1
EXECUTE stmt;
INSERT INTO t2 VALUES (0);
EXECUTE stmt;
START TRANSACTION ;
EXECUTE stmt;
# Cleanup
--disconnect con1
--disconnect con2
--connection default
DROP VIEW v;
DROP TABLE t1, t2;
SET GLOBAL query_cache_size= @qcs.save, query_cache_type= @qct.save;
5.5 0943b33de3daa
#3 <signal handler called>
#4 0x000000000080a202 in Item_func::print_op (this=0x7f2d424ef030, str=0x7f2d5237cc80, query_type=QT_ORDINARY) at /data/src/5.5/sql/item_func.cc:496
#5 0x00000000007f1db9 in Item_bool_func2::print (this=0x7f2d424ef030, str=0x7f2d5237cc80, query_type=QT_ORDINARY) at /data/src/5.5/sql/item_cmpfunc.h:386
#6 0x00000000007ecf84 in Item_cond::print (this=0x7f2d424241a0, str=0x7f2d5237cc80, query_type=QT_ORDINARY) at /data/src/5.5/sql/item_cmpfunc.cc:4702
#7 0x00000000007d75b8 in dbug_print_item (item=0x7f2d424241a0) at /data/src/5.5/sql/item.cc:10012
#8 0x000000000062eae0 in JOIN::prepare (this=0x7f2d424243b0, rref_pointer_array=0x7f2d424a3ab0, tables_init=0x7f2d424a45e8, wild_num=0, conds_init=0x7f2d424241a0, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7f2d424a3810, unit_arg=0x7f2d424a3130) at /data/src/5.5/sql/sql_select.cc:642
#9 0x000000000063793a in mysql_select (thd=0x7f2d4a210060, rref_pointer_array=0x7f2d424a3ab0, tables=0x7f2d424a45e8, wild_num=0, fields=..., conds=0x7f2d424241a0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2417232640, result=0x7f2d424a7088, unit=0x7f2d424a3130, select_lex=0x7f2d424a3810) at /data/src/5.5/sql/sql_select.cc:3098
#10 0x000000000062e19c in handle_select (thd=0x7f2d4a210060, lex=0x7f2d424a3080, result=0x7f2d424a7088, setup_tables_done_option=0) at /data/src/5.5/sql/sql_select.cc:323
#11 0x0000000000607632 in execute_sqlcom_select (thd=0x7f2d4a210060, all_tables=0x7f2d424a45e8) at /data/src/5.5/sql/sql_parse.cc:4678
#12 0x00000000006009b3 in mysql_execute_command (thd=0x7f2d4a210060) at /data/src/5.5/sql/sql_parse.cc:2224
#13 0x00000000006217e9 in Prepared_statement::execute (this=0x7f2d424d9460, expanded_query=0x7f2d5237dd90, open_cursor=false) at /data/src/5.5/sql/sql_prepare.cc:3932
#14 0x00000000006208fd in Prepared_statement::execute_loop (this=0x7f2d424d9460, expanded_query=0x7f2d5237dd90, open_cursor=false, packet=0x0, packet_end=0x0) at /data/src/5.5/sql/sql_prepare.cc:3591
#15 0x000000000061ea1b in mysql_sql_stmt_execute (thd=0x7f2d4a210060) at /data/src/5.5/sql/sql_prepare.cc:2740
#16 0x00000000006009e1 in mysql_execute_command (thd=0x7f2d4a210060) at /data/src/5.5/sql/sql_parse.cc:2234
#17 0x000000000060a1fe in mysql_parse (thd=0x7f2d4a210060, rawbuf=0x7f2d42424078 "EXECUTE stmt", length=12, parser_state=0x7f2d5237e640) at /data/src/5.5/sql/sql_parse.cc:5923
#18 0x00000000005fdf13 in dispatch_command (command=COM_QUERY, thd=0x7f2d4a210060, packet=0x7f2d4a215061 "EXECUTE stmt", packet_length=12) at /data/src/5.5/sql/sql_parse.cc:1066
#19 0x00000000005fd105 in do_command (thd=0x7f2d4a210060) at /data/src/5.5/sql/sql_parse.cc:793
#20 0x000000000070024f in do_handle_one_connection (thd_arg=0x7f2d4a210060) at /data/src/5.5/sql/sql_connect.cc:1268
#21 0x00000000006fffdc in handle_one_connection (arg=0x7f2d4a210060) at /data/src/5.5/sql/sql_connect.cc:1184
#22 0x0000000000a0e071 in pfs_spawn_thread (arg=0x7f2d4a392b60) at /data/src/5.5/storage/perfschema/pfs.cc:1015
#23 0x00007f2d52004494 in start_thread (arg=0x7f2d5237f700) at pthread_create.c:333
#24 0x00007f2d50a1a93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
10.1 1bec0c45954
==12743==ERROR: AddressSanitizer: use-after-poison on address 0x62b000016738 at pc 0x55a800de7fb2 bp 0x7f06db921e30 sp 0x7f06db921e28
READ of size 8 at 0x62b000016738 thread T24
#0 0x55a800de7fb1 in Item_func::print_op(String*, enum_query_type) /data/src/10.1/sql/item_func.cc:481
#1 0x55a800d6c332 in Item_bool_rowready_func2::print(String*, enum_query_type) /data/src/10.1/sql/item_cmpfunc.h:470
#2 0x55a800d446c4 in Item_cond::print(String*, enum_query_type) /data/src/10.1/sql/item_cmpfunc.cc:4957
#3 0x55a800d16b89 in dbug_print_item(Item*) /data/src/10.1/sql/item.cc:9926
#4 0x55a8008708e1 in JOIN::prepare(Item***, TABLE_LIST*, unsigned int, Item*, unsigned int, st_order*, bool, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*) /data/src/10.1/sql/sql_select.cc:716
#5 0x55a80089cba3 in mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_0x62b000016738 is located 5432 bytes inside of 24716-byte region [0x62b000015200,0x62b00001b28c)
allocated by thread T24 here:
#0 0x7f06e401773f in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x5473f)
#1 0x55a801ae7ef2 in sf_malloc /data/src/10.1/mysys/safemalloc.c:115
#2 0x55a801be0d1a (/data/bld/10.1-asan/bin/mysqld+0x1d93d1a)
relates to
MDEV-15492
Subquery crash similar to MDEV-10050
Closed
Elena Stepanova
made changes -
2018-03-15 13:29
Assignee
Elena Stepanova
[ elenst
]
Oleksandr Byelkin
[ sanja
]
Oleksandr Byelkin
made changes -
2018-06-07 08:58
Status
Open
[ 1
]
In Progress
[ 3
]
Oleksandr Byelkin
made changes -
2018-06-07 10:35
Status
In Progress
[ 3
]
Stalled
[ 10000
]
Oleksandr Byelkin
made changes -
2018-06-07 10:37
Fix Version/s
10.3.6
[ 23003
]
Fix Version/s
10.2.14
[ 22911
]
Fix Version/s
10.1.32
[ 22908
]
Fix Version/s
10.0.35
[ 22912
]
Fix Version/s
5.5.60
[ 22913
]
Fix Version/s
10.2
[ 14601
]
Fix Version/s
5.5
[ 15800
]
Fix Version/s
10.0
[ 16000
]
Fix Version/s
10.1
[ 16100
]
Fix Version/s
10.3
[ 22126
]
Resolution
Duplicate
[ 3
]
Status
Stalled
[ 10000
]
Closed
[ 6
]
Sergei Golubchik
made changes -
2021-12-06 21:46
Workflow
MariaDB v3
[ 86047
]
MariaDB v4
[ 153962
]
{"report":{"fcp":1011.5,"ttfb":305.89999985694885,"pageVisibility":"visible","entityId":66344,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"76117a50-c72a-42e9-b2d3-85f49b242dfd","navigationType":0,"readyForUser":1108.6999998092651,"redirectCount":0,"resourceLoadedEnd":714.8999998569489,"resourceLoadedStart":314.59999990463257,"resourceTiming":[{"duration":89,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":314.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":314.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":403.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":104.10000014305115,"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":314.89999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":314.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":419,"responseStart":0,"secureConnectionStart":0},{"duration":289.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":315.09999990463257,"connectEnd":315.09999990463257,"connectStart":315.09999990463257,"domainLookupEnd":315.09999990463257,"domainLookupStart":315.09999990463257,"fetchStart":315.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":420.59999990463257,"responseEnd":604.5999999046326,"responseStart":450.5,"secureConnectionStart":315.09999990463257},{"duration":399.59999990463257,"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":315.2999999523163,"connectEnd":315.2999999523163,"connectStart":315.2999999523163,"domainLookupEnd":315.2999999523163,"domainLookupStart":315.2999999523163,"fetchStart":315.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":420.7999999523163,"responseEnd":714.8999998569489,"responseStart":451.89999985694885,"secureConnectionStart":315.2999999523163},{"duration":143.10000014305115,"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":315.69999980926514,"connectEnd":315.69999980926514,"connectStart":315.69999980926514,"domainLookupEnd":315.69999980926514,"domainLookupStart":315.69999980926514,"fetchStart":315.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":428.2999999523163,"responseEnd":458.7999999523163,"responseStart":454.2999999523163,"secureConnectionStart":315.69999980926514},{"duration":143.59999990463257,"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":316,"connectEnd":316,"connectStart":316,"domainLookupEnd":316,"domainLookupStart":316,"fetchStart":316,"redirectEnd":0,"redirectStart":0,"requestStart":428.89999985694885,"responseEnd":459.59999990463257,"responseStart":455.39999985694885,"secureConnectionStart":316},{"duration":143.70000004768372,"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":316.2999999523163,"connectEnd":316.2999999523163,"connectStart":316.2999999523163,"domainLookupEnd":316.2999999523163,"domainLookupStart":316.2999999523163,"fetchStart":316.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":429.09999990463257,"responseEnd":460,"responseStart":456.59999990463257,"secureConnectionStart":316.2999999523163},{"duration":107.89999985694885,"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":316.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":316.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":424.39999985694885,"responseStart":0,"secureConnectionStart":0},{"duration":143.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":316.59999990463257,"connectEnd":316.59999990463257,"connectStart":316.59999990463257,"domainLookupEnd":316.59999990463257,"domainLookupStart":316.59999990463257,"fetchStart":316.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":429.2999999523163,"responseEnd":459.69999980926514,"responseStart":456,"secureConnectionStart":316.59999990463257},{"duration":109.09999990463257,"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":316.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":316.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":425.89999985694885,"responseStart":0,"secureConnectionStart":0},{"duration":143.20000004768372,"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":316.89999985694885,"connectEnd":316.89999985694885,"connectStart":316.89999985694885,"domainLookupEnd":316.89999985694885,"domainLookupStart":316.89999985694885,"fetchStart":316.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":429.39999985694885,"responseEnd":460.09999990463257,"responseStart":457,"secureConnectionStart":316.89999985694885},{"duration":383.7000000476837,"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":317.7999999523163,"connectEnd":317.7999999523163,"connectStart":317.7999999523163,"domainLookupEnd":317.7999999523163,"domainLookupStart":317.7999999523163,"fetchStart":317.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":495.69999980926514,"responseEnd":701.5,"responseStart":693.7999999523163,"secureConnectionStart":317.7999999523163},{"duration":386.5,"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":317.89999985694885,"connectEnd":317.89999985694885,"connectStart":317.89999985694885,"domainLookupEnd":317.89999985694885,"domainLookupStart":317.89999985694885,"fetchStart":317.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":547.5999999046326,"responseEnd":704.3999998569489,"responseStart":699.5,"secureConnectionStart":317.89999985694885},{"duration":190.70000004768372,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":756.2999999523163,"connectEnd":756.2999999523163,"connectStart":756.2999999523163,"domainLookupEnd":756.2999999523163,"domainLookupStart":756.2999999523163,"fetchStart":756.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":914.5999999046326,"responseEnd":947,"responseStart":946.3999998569489,"secureConnectionStart":756.2999999523163}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":112,"responseStart":306,"responseEnd":312,"domLoading":309,"domInteractive":1181,"domContentLoadedEventStart":1181,"domContentLoadedEventEnd":1227,"domComplete":2334,"loadEventStart":2334,"loadEventEnd":2335,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1157.0999999046326},{"name":"bigPipe.sidebar-id.end","time":1158},{"name":"bigPipe.activity-panel-pipe-id.start","time":1158.0999999046326},{"name":"bigPipe.activity-panel-pipe-id.end","time":1161.6999998092651},{"name":"activityTabFullyLoaded","time":1245.5}],"measures":[],"correlationId":"61156f61ae1479","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":114,"dbReadsTimeInMs":17,"dbConnsTimeInMs":26,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}