Type:
Bug
Priority:
Major
Resolution:
Fixed
Affects Version/s:
5.5(EOL) , 10.0(EOL) , 10.1(EOL) , 10.2(EOL) , 10.3(EOL)
5.5 ddc5c65333a4ad
#3 <signal handler called>
#4 0x0000000000786511 in Field::make_field (this=0x7efd41cdfb98, field=0x7efd6cbcbe40) at /data/src/5.5/sql/field.cc:1581
#5 0x0000000000786aa9 in Field_num::make_field (this=0x7efd41cdfb98, field=0x7efd6cbcbe40) at /data/src/5.5/sql/field.cc:1713
#6 0x00000000007cc346 in Item_field::make_field (this=0x7efd41ce0078, tmp_field=0x7efd6cbcbe40) at /data/src/5.5/sql/item.cc:6039
#7 0x0000000000565da1 in Protocol::send_result_set_metadata (this=0x7efd48e87660, list=0x7efd41cf8368, flags=4) at /data/src/5.5/sql/protocol.cc:755
#8 0x00000000005c885b in select_send::send_result_set_metadata (this=0x7efd41cf6b00, list=..., flags=4) at /data/src/5.5/sql/sql_class.cc:2326
#9 0x000000000061d453 in mysql_test_handler_read (stmt=0x7efd41d2f460, tables=0x7efd41cf6530) at /data/src/5.5/sql/sql_prepare.cc:2014
#10 0x000000000061d84c in check_prepared_statement (stmt=0x7efd41d2f460) at /data/src/5.5/sql/sql_prepare.cc:2142
#11 0x0000000000620486 in Prepared_statement::prepare (this=0x7efd41d2f460, packet=0x7efd4f372061 "", packet_len=20) at /data/src/5.5/sql/sql_prepare.cc:3390
#12 0x000000000061dbae in mysqld_stmt_prepare (thd=0x7efd48e87060, packet=0x7efd4f372061 "", packet_length=20) at /data/src/5.5/sql/sql_prepare.cc:2292
#13 0x00000000005fde52 in dispatch_command (command=COM_STMT_PREPARE, thd=0x7efd48e87060, packet=0x7efd4f372061 "", packet_length=20) at /data/src/5.5/sql/sql_parse.cc:1035
#14 0x00000000005fd217 in do_command (thd=0x7efd48e87060) at /data/src/5.5/sql/sql_parse.cc:793
#15 0x0000000000700373 in do_handle_one_connection (thd_arg=0x7efd48e87060) at /data/src/5.5/sql/sql_connect.cc:1268
#16 0x0000000000700100 in handle_one_connection (arg=0x7efd48e87060) at /data/src/5.5/sql/sql_connect.cc:1184
#17 0x00007efd6c81d494 in start_thread (arg=0x7efd6cbcd700) at pthread_create.c:333
#18 0x00007efd6b23393f in clone () from /lib/x86_64-linux-gnu/libc.so.6
Note: the test cannot be run in MTR without modifying the code, because mysqltest.cc artificially restricts the set of statements which can be run via PS protocol. With the following addition it can be possible:
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index efc25f3..9e69ea8 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -8776,6 +8776,7 @@ void init_re(void)
"[[:space:]]*SELECT[[:space:]]|"
"[[:space:]]*CREATE[[:space:]]+TABLE[[:space:]]|"
"[[:space:]]*DO[[:space:]]|"
+ ".*READ[[:space:]]|"
"[[:space:]]*SET[[:space:]]+OPTION[[:space:]]|"
"[[:space:]]*DELETE[[:space:]]+MULTI[[:space:]]|"
"[[:space:]]*UPDATE[[:space:]]+MULTI[[:space:]]|"
# Run with --ps-protocol
CREATE TABLE `t1` (`i` INT ) ;
HANDLER test.t1 OPEN handler_a ;
HANDLER handler_a READ FIRST ;
Alternatively, here is a crude C test:
#include <my_global.h>
#include <mysql.h>
int main( int argc, char **argv)
{
MYSQL *con = mysql_init(NULL);
MYSQL_STMT *stmt = mysql_stmt_init(con);
if (con == NULL)
goto err;
if (mysql_real_connect(con, "127.0.0.1" , "root" , "" , "test" , 0, NULL, 0) == NULL)
goto err;
if (mysql_query(con, "DROP TABLE IF EXISTS t1" ))
goto err;
if (mysql_query(con, "CREATE TABLE t1 (i INT)" ))
goto err;
if (mysql_query(con, "HANDLER t1 OPEN h" ))
goto err;
if (mysql_stmt_prepare(stmt, "HANDLER h READ FIRST" ,20))
goto err;
if (mysql_stmt_execute(stmt))
goto err;
mysql_close(con);
exit (0);
err:
fprintf (stderr, "%s\n" , mysql_error(con));
if (con)
mysql_close(con);
}
Same result can be achieved with perl's DBD::mysql by using mysql_server_prepare=1 .
Not reproducible with PREPARE / EXECUTE.
Not reproducible with MySQL 5.5-5.7, they return "This command is not supported in the prepared statement protocol yet" instead.
relates to
MDEV-15489
[Draft] Server crashes in Field::make_field
Open
{"report":{"fcp":1465.5,"ttfb":639.5,"pageVisibility":"visible","entityId":66598,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"f96a0339-4ca4-4676-9aa1-a617ec2d6820","navigationType":0,"readyForUser":1579.1999998092651,"redirectCount":0,"resourceLoadedEnd":2147.300000190735,"resourceLoadedStart":645.6999998092651,"resourceTiming":[{"duration":254.60000038146973,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":645.6999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":645.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":900.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":254.60000038146973,"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":646,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":646,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":900.6000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":310.20000076293945,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":646.1999998092651,"connectEnd":646.1999998092651,"connectStart":646.1999998092651,"domainLookupEnd":646.1999998092651,"domainLookupStart":646.1999998092651,"fetchStart":646.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":646.1999998092651,"responseEnd":956.4000005722046,"responseStart":956.4000005722046,"secureConnectionStart":646.1999998092651},{"duration":391.1000003814697,"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":646.5,"connectEnd":646.5,"connectStart":646.5,"domainLookupEnd":646.5,"domainLookupStart":646.5,"fetchStart":646.5,"redirectEnd":0,"redirectStart":0,"requestStart":646.5,"responseEnd":1037.6000003814697,"responseStart":1037.6000003814697,"secureConnectionStart":646.5},{"duration":395.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":646.6999998092651,"connectEnd":646.6999998092651,"connectStart":646.6999998092651,"domainLookupEnd":646.6999998092651,"domainLookupStart":646.6999998092651,"fetchStart":646.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":646.6999998092651,"responseEnd":1041.8000001907349,"responseStart":1041.8000001907349,"secureConnectionStart":646.6999998092651},{"duration":395.3999996185303,"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":646.9000005722046,"connectEnd":646.9000005722046,"connectStart":646.9000005722046,"domainLookupEnd":646.9000005722046,"domainLookupStart":646.9000005722046,"fetchStart":646.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":646.9000005722046,"responseEnd":1042.3000001907349,"responseStart":1042.3000001907349,"secureConnectionStart":646.9000005722046},{"duration":395.69999980926514,"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":647,"connectEnd":647,"connectStart":647,"domainLookupEnd":647,"domainLookupStart":647,"fetchStart":647,"redirectEnd":0,"redirectStart":0,"requestStart":647,"responseEnd":1042.6999998092651,"responseStart":1042.6999998092651,"secureConnectionStart":647},{"duration":459,"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":647.1999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":647.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1106.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":395.79999923706055,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":647.4000005722046,"connectEnd":647.4000005722046,"connectStart":647.4000005722046,"domainLookupEnd":647.4000005722046,"domainLookupStart":647.4000005722046,"fetchStart":647.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":647.4000005722046,"responseEnd":1043.1999998092651,"responseStart":1043.1999998092651,"secureConnectionStart":647.4000005722046},{"duration":458.69999980926514,"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":647.6000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":647.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1106.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":396.1000003814697,"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":647.6999998092651,"connectEnd":647.6999998092651,"connectStart":647.6999998092651,"domainLookupEnd":647.6999998092651,"domainLookupStart":647.6999998092651,"fetchStart":647.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":647.6999998092651,"responseEnd":1043.8000001907349,"responseStart":1043.8000001907349,"secureConnectionStart":647.6999998092651},{"duration":1367.6999998092651,"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":653.1000003814697,"connectEnd":653.1000003814697,"connectStart":653.1000003814697,"domainLookupEnd":653.1000003814697,"domainLookupStart":653.1000003814697,"fetchStart":653.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":653.1000003814697,"responseEnd":2020.8000001907349,"responseStart":2020.8000001907349,"secureConnectionStart":653.1000003814697},{"duration":1494.1000003814697,"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":653.1999998092651,"connectEnd":653.1999998092651,"connectStart":653.1999998092651,"domainLookupEnd":653.1999998092651,"domainLookupStart":653.1999998092651,"fetchStart":653.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":653.1999998092651,"responseEnd":2147.300000190735,"responseStart":2147.199999809265,"secureConnectionStart":653.1999998092651},{"duration":906.7999992370605,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1118.4000005722046,"connectEnd":1118.4000005722046,"connectStart":1118.4000005722046,"domainLookupEnd":1118.4000005722046,"domainLookupStart":1118.4000005722046,"fetchStart":1118.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":1118.4000005722046,"responseEnd":2025.1999998092651,"responseStart":2025.1999998092651,"secureConnectionStart":1118.4000005722046},{"duration":721.7999992370605,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1456.9000005722046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1456.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2178.699999809265,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":464,"responseStart":639,"responseEnd":644,"domLoading":643,"domInteractive":2200,"domContentLoadedEventStart":2200,"domContentLoadedEventEnd":2245,"domComplete":3267,"loadEventStart":3267,"loadEventEnd":3269,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2152},{"name":"bigPipe.sidebar-id.end","time":2152.800000190735},{"name":"bigPipe.activity-panel-pipe-id.start","time":2153},{"name":"bigPipe.activity-panel-pipe-id.end","time":2155.300000190735},{"name":"activityTabFullyLoaded","time":2253.9000005722046}],"measures":[],"correlationId":"e8e6d4b38e00c3","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":106,"dbReadsTimeInMs":14,"dbConnsTimeInMs":24,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}