While mysql_stmt_error() returns the correct result from failing mysql_stmt_prepare(), mysql_error() returns the error from mysql_stmt_execute()
static int test_execute_direct_error(MYSQL *mysql)
|
{
|
MYSQL_STMT *stmt= mysql_stmt_init(mysql);
|
int rc;
|
|
rc= mariadb_stmt_execute_direct(stmt, SL("SELECT SYNTAX_ERROR"));
|
diag("stmt_error: %s", mysql_stmt_error(stmt))
|
diag("mysql_error: %s", mysql_error(mysql))
|
FAIL_IF(!rc, "Error expected")
|
|
mysql_stmt_close(stmt);
|
return OK;
|
}
|
Output:
# stmt_error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CALL P1()' at line 1
|
# mysql_error: Unknown prepared statement handler (4294967295) given to mysqld_stmt_execute
|
{"report":{"fcp":1091.2000000476837,"ttfb":225.29999995231628,"pageVisibility":"visible","entityId":118994,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"5883ddfa-26fb-4f86-b89f-acbb8488186f","navigationType":0,"readyForUser":1163.3999998569489,"redirectCount":0,"resourceLoadedEnd":1239.0999999046326,"resourceLoadedStart":230.59999990463257,"resourceTiming":[{"duration":388.10000014305115,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":230.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":230.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":618.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":388.2000000476837,"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":230.89999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":230.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":619.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":400.7000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":231,"connectEnd":231,"connectStart":231,"domainLookupEnd":231,"domainLookupStart":231,"fetchStart":231,"redirectEnd":0,"redirectStart":0,"requestStart":231,"responseEnd":631.7000000476837,"responseStart":631.7000000476837,"secureConnectionStart":231},{"duration":430.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":231.20000004768372,"connectEnd":231.20000004768372,"connectStart":231.20000004768372,"domainLookupEnd":231.20000004768372,"domainLookupStart":231.20000004768372,"fetchStart":231.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":231.20000004768372,"responseEnd":661.7999999523163,"responseStart":661.7999999523163,"secureConnectionStart":231.20000004768372},{"duration":434.2000000476837,"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":231.39999985694885,"connectEnd":231.39999985694885,"connectStart":231.39999985694885,"domainLookupEnd":231.39999985694885,"domainLookupStart":231.39999985694885,"fetchStart":231.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":231.39999985694885,"responseEnd":665.5999999046326,"responseStart":665.5999999046326,"secureConnectionStart":231.39999985694885},{"duration":434.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":231.59999990463257,"connectEnd":231.59999990463257,"connectStart":231.59999990463257,"domainLookupEnd":231.59999990463257,"domainLookupStart":231.59999990463257,"fetchStart":231.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":231.59999990463257,"responseEnd":666.0999999046326,"responseStart":666.0999999046326,"secureConnectionStart":231.59999990463257},{"duration":434.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":231.70000004768372,"connectEnd":231.70000004768372,"connectStart":231.70000004768372,"domainLookupEnd":231.70000004768372,"domainLookupStart":231.70000004768372,"fetchStart":231.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":231.70000004768372,"responseEnd":666.3999998569489,"responseStart":666.3999998569489,"secureConnectionStart":231.70000004768372},{"duration":543.7000000476837,"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":232,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":232,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":775.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":434.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":232.09999990463257,"connectEnd":232.09999990463257,"connectStart":232.09999990463257,"domainLookupEnd":232.09999990463257,"domainLookupStart":232.09999990463257,"fetchStart":232.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":232.09999990463257,"responseEnd":666.8999998569489,"responseStart":666.8999998569489,"secureConnectionStart":232.09999990463257},{"duration":543.5999999046326,"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":232.29999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":232.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":775.8999998569489,"responseStart":0,"secureConnectionStart":0},{"duration":435,"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":232.39999985694885,"connectEnd":232.39999985694885,"connectStart":232.39999985694885,"domainLookupEnd":232.39999985694885,"domainLookupStart":232.39999985694885,"fetchStart":232.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":232.39999985694885,"responseEnd":667.3999998569489,"responseStart":667.3999998569489,"secureConnectionStart":232.39999985694885},{"duration":632.5999999046326,"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":233.20000004768372,"connectEnd":233.20000004768372,"connectStart":233.20000004768372,"domainLookupEnd":233.20000004768372,"domainLookupStart":233.20000004768372,"fetchStart":233.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":233.20000004768372,"responseEnd":865.7999999523163,"responseStart":865.7999999523163,"secureConnectionStart":233.20000004768372},{"duration":1002.4000000953674,"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":233.29999995231628,"connectEnd":233.29999995231628,"connectStart":233.29999995231628,"domainLookupEnd":233.29999995231628,"domainLookupStart":233.29999995231628,"fetchStart":233.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":233.29999995231628,"responseEnd":1235.7000000476837,"responseStart":1235.7000000476837,"secureConnectionStart":233.29999995231628},{"duration":103,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":803.5999999046326,"connectEnd":803.5999999046326,"connectStart":803.5999999046326,"domainLookupEnd":803.5999999046326,"domainLookupStart":803.5999999046326,"fetchStart":803.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":803.5999999046326,"responseEnd":906.5999999046326,"responseStart":906.5999999046326,"secureConnectionStart":803.5999999046326},{"duration":191.70000004768372,"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":1047.3999998569489,"connectEnd":1047.3999998569489,"connectStart":1047.3999998569489,"domainLookupEnd":1047.3999998569489,"domainLookupStart":1047.3999998569489,"fetchStart":1047.3999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":1047.3999998569489,"responseEnd":1239.0999999046326,"responseStart":1239.0999999046326,"secureConnectionStart":1047.3999998569489},{"duration":183.29999995231628,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1085.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1085.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1268.5,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":73,"responseStart":225,"responseEnd":229,"domLoading":228,"domInteractive":1291,"domContentLoadedEventStart":1291,"domContentLoadedEventEnd":1328,"domComplete":2042,"loadEventStart":2042,"loadEventEnd":2043,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1271.2000000476837},{"name":"bigPipe.sidebar-id.end","time":1272},{"name":"bigPipe.activity-panel-pipe-id.start","time":1272.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":1274.5},{"name":"activityTabFullyLoaded","time":1333.5}],"measures":[],"correlationId":"4de7d24f55a3e7","effectiveType":"4g","downlink":9.5,"rtt":0,"serverDuration":93,"dbReadsTimeInMs":11,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}