Type:
Task
Priority:
Critical
Resolution:
Fixed
To fix MDEV-17588 , we need to postpone resolving of the storage engine to the handlerton pointer, from `mysql_parse()` time to `mysql_execute_command()` time.
So we need to pass the storage engine name, scanned in the ENGINE=XXX clause, through LEX.
Adding the storage engine name as a member to LEX (directly, or through its parts like HA_CREATE_INFO) is not nice:
LEX is already huge enough.
The logic of LEX initialization and updating is already too complex.
The easiest way to solve this would be moving the create table related code to a new class Sql_cmd_create_table, with a member:
LEX_CSTRING m_storage_engine_name;
and adding the same member to Sql_cmd_alter_table.
Proposed changes
`mysql_execute_command()` changes
The `case SQLCMD_CREATE_TABLE ` part of `mysql_execute_command()` will go to `Sql_cmd_create_table::execute()`.
Grammar changes to the `create_table_option` rule
This code in sql_yacc.yy:
create_table_option:
ENGINE_SYM opt_equal storage_engines
{
Lex->create_info.db_type= $3;
Lex->create_info.used_fields|= HA_CREATE_USED_ENGINE;
}
will change to:
create_table_option:
ENGINE_SYM opt_equal ident_or_text
{
// Set m_storage_engine_name of the current Sql_cmd_create_table or Sql_cmd_alter_table.
}
Grammar changes to the `storage_engine` rule
The code in the rule storage_engines: will go to a new method in THD:
bool resolve_storage_engine(handlerton **ha, const LEX_CSTRING &name,
bool tmp_table);
so it can be reused by:
The `storage_engines` rule
Sql_cmd_create_table::execute()
Sql_cmd_alter_table::execute()
This change should fix MDEV-17588 automatically.
blocks
MDEV-17588
replicate-do filters cause errors when creating filtered-out tables on master with syntax unsupported on slave
Closed
Transition
Time In Source Status
Execution Times
Open
In Progress
4m 31s
1
In Progress
Closed
34d 8h 8m
1
{"report":{"fcp":1569.1000001430511,"ttfb":464.60000014305115,"pageVisibility":"visible","entityId":76501,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"869f4d1a-f582-439a-a674-cd14f343c658","navigationType":0,"readyForUser":1655.6000001430511,"redirectCount":0,"resourceLoadedEnd":1352.2000000476837,"resourceLoadedStart":478.40000009536743,"resourceTiming":[{"duration":346.2999999523163,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":478.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":478.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":824.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":346.40000009536743,"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":478.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":478.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":825.1000001430511,"responseStart":0,"secureConnectionStart":0},{"duration":644.2000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":479,"connectEnd":479,"connectStart":479,"domainLookupEnd":479,"domainLookupStart":479,"fetchStart":479,"redirectEnd":0,"redirectStart":0,"requestStart":827.2000000476837,"responseEnd":1123.2000000476837,"responseStart":853.7000000476837,"secureConnectionStart":479},{"duration":776.5,"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":479.2000000476837,"connectEnd":479.2000000476837,"connectStart":479.2000000476837,"domainLookupEnd":479.2000000476837,"domainLookupStart":479.2000000476837,"fetchStart":479.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":827.1000001430511,"responseEnd":1255.7000000476837,"responseStart":853,"secureConnectionStart":479.2000000476837},{"duration":391.7999999523163,"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":479.40000009536743,"connectEnd":479.40000009536743,"connectStart":479.40000009536743,"domainLookupEnd":479.40000009536743,"domainLookupStart":479.40000009536743,"fetchStart":479.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":827.4000000953674,"responseEnd":871.2000000476837,"responseStart":870.4000000953674,"secureConnectionStart":479.40000009536743},{"duration":390.10000014305115,"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":479.5,"connectEnd":479.5,"connectStart":479.5,"domainLookupEnd":479.5,"domainLookupStart":479.5,"fetchStart":479.5,"redirectEnd":0,"redirectStart":0,"requestStart":827.4000000953674,"responseEnd":869.6000001430511,"responseStart":855.1000001430511,"secureConnectionStart":479.5},{"duration":377.30000019073486,"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":479.7999999523163,"connectEnd":479.7999999523163,"connectStart":479.7999999523163,"domainLookupEnd":479.7999999523163,"domainLookupStart":479.7999999523163,"fetchStart":479.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":828.2999999523163,"responseEnd":857.1000001430511,"responseStart":856.1000001430511,"secureConnectionStart":479.7999999523163},{"duration":345.39999985694885,"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":479.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":479.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":825.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":384,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":480.10000014305115,"connectEnd":480.10000014305115,"connectStart":480.10000014305115,"domainLookupEnd":480.10000014305115,"domainLookupStart":480.10000014305115,"fetchStart":480.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":828.4000000953674,"responseEnd":864.1000001430511,"responseStart":862.2000000476837,"secureConnectionStart":480.10000014305115},{"duration":345.90000009536743,"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":480.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":480.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":826.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":392.60000014305115,"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":480.5,"connectEnd":480.5,"connectStart":480.5,"domainLookupEnd":480.5,"domainLookupStart":480.5,"fetchStart":480.5,"redirectEnd":0,"redirectStart":0,"requestStart":828.6000001430511,"responseEnd":873.1000001430511,"responseStart":862.7999999523163,"secureConnectionStart":480.5},{"duration":771,"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":481.40000009536743,"connectEnd":481.40000009536743,"connectStart":481.40000009536743,"domainLookupEnd":481.40000009536743,"domainLookupStart":481.40000009536743,"fetchStart":481.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":1115.9000000953674,"responseEnd":1252.4000000953674,"responseStart":1249.7999999523163,"secureConnectionStart":481.40000009536743},{"duration":870.7999999523163,"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":481.40000009536743,"connectEnd":481.40000009536743,"connectStart":481.40000009536743,"domainLookupEnd":481.40000009536743,"domainLookupStart":481.40000009536743,"fetchStart":481.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":1339.7000000476837,"responseEnd":1352.2000000476837,"responseStart":1350.9000000953674,"secureConnectionStart":481.40000009536743},{"duration":229.30000019073486,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1262.2999999523163,"connectEnd":1262.2999999523163,"connectStart":1262.2999999523163,"domainLookupEnd":1262.2999999523163,"domainLookupStart":1262.2999999523163,"fetchStart":1262.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":1456.7999999523163,"responseEnd":1491.6000001430511,"responseStart":1491,"secureConnectionStart":1262.2999999523163}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":269,"responseStart":465,"responseEnd":467,"domLoading":476,"domInteractive":1753,"domContentLoadedEventStart":1753,"domContentLoadedEventEnd":1815,"domComplete":2678,"loadEventStart":2678,"loadEventEnd":2679,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1724.2000000476837},{"name":"bigPipe.sidebar-id.end","time":1725},{"name":"bigPipe.activity-panel-pipe-id.start","time":1725.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":1726.2000000476837},{"name":"activityTabFullyLoaded","time":1830.5}],"measures":[],"correlationId":"27763ce1fa2920","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":116,"dbReadsTimeInMs":19,"dbConnsTimeInMs":27,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}