In MDEV-4628 and others MDEV related to wrong table engine, should be nice a tool that could read a file and show information about it
1) check if file is a FRM file
2) read information about it without mysql source code
3) read information using mysql source code
why (2) and (3) ? the 2 will read the file as a fileinfo program, the (3) will use the current mysqld source code and show how it read the file
it's a debug tool, and maybe we could put it online in mariadb.org a place where a user submit the .frm file and check the informations about that file
problems:
1) know the file format of all versions of FRM file -> for the (2) feature
2) know how mysqld read the FRM file -> for the (3) feature
3) what language? maybe c++ and c
4) if in a language different from mariadb.org we should create a webpage to upload the file, run the tool and send result back to user
Attachments
Issue Links
relates to
MDEV-4628PARTITION - Problem with CONNECT/ARIA frm file - mariadb 10.0.x
Closed
MDEV-18827Create utility to parse frm files and print their DDL (Full-time project - potential part-time)
Look in TABLE_SHARE::init_from_binary_frm_image() in 10.0.
All you need to do is to remove data structures that it creates, and
replace them with printf's. And you'll have a standalone frm parser.
Sergei Golubchik
added a comment - This is, actually, pretty easy.
Look in TABLE_SHARE::init_from_binary_frm_image() in 10.0.
All you need to do is to remove data structures that it creates, and
replace them with printf's. And you'll have a standalone frm parser.
nice! with time i will do this
does version of mysql:
3.23, 4, 4.1, 5... 5.7 .. have this?
what about mariadb
5.1,5.2,5.3,5.5?
i want to do a currently server output, and a per version output to check what different versions report
roberto spadim
added a comment - nice! with time i will do this
does version of mysql:
3.23, 4, 4.1, 5... 5.7 .. have this?
what about mariadb
5.1,5.2,5.3,5.5?
i want to do a currently server output, and a per version output to check what different versions report
You need to take the code from 10.0, but it will be able to parse old
frms (from 3.23, 4.0, etc) too.
Regards,
Sergei
Sergei Golubchik
added a comment - Hi, Roberto!
You need to take the code from 10.0, but it will be able to parse old
frms (from 3.23, 4.0, etc) too.
Regards,
Sergei
nice, my idea is after any mysql/mariadb source code change for this function
add a new function outside mysqld code, but inside mariadb source code
that will return the values of FRM file
and report the 'old' values for each version (based in MARIADB / MYSQL / DRIZZLE / ANY OTHER PORT, and VERSION (maybe commit id, or version id) )
and the current server values
with that we have FRM fields in all 'old' versions of mysql/mariadb starting from the first version
it will be very big if we (mariadb/mysql/drizlle/etc...) made changes every time to this function, and we will need to change structs names to don't have same name and different structs
well for the first version, only current server values will do a nice job =)
thanks, with time i implement this
roberto spadim
added a comment - nice, my idea is after any mysql/mariadb source code change for this function
add a new function outside mysqld code, but inside mariadb source code
that will return the values of FRM file
and report the 'old' values for each version (based in MARIADB / MYSQL / DRIZZLE / ANY OTHER PORT, and VERSION (maybe commit id, or version id) )
and the current server values
with that we have FRM fields in all 'old' versions of mysql/mariadb starting from the first version
it will be very big if we (mariadb/mysql/drizlle/etc...) made changes every time to this function, and we will need to change structs names to don't have same name and different structs
well for the first version, only current server values will do a nice job =)
thanks, with time i implement this
People
Unassigned
roberto spadim
Votes:
1Vote for this issue
Watchers:
4Start watching this issue
Dates
Created:
Updated:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":842.5,"ttfb":119.79999995231628,"pageVisibility":"visible","entityId":24360,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"d1f14e8e-ea73-4234-b0e1-e0152fe3575f","navigationType":0,"readyForUser":899.5,"redirectCount":0,"resourceLoadedEnd":861.2000000476837,"resourceLoadedStart":125.09999990463257,"resourceTiming":[{"duration":139.10000014305115,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":125.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":125.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":264.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":138.80000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":125.39999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":125.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":264.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":148,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":125.59999990463257,"connectEnd":125.59999990463257,"connectStart":125.59999990463257,"domainLookupEnd":125.59999990463257,"domainLookupStart":125.59999990463257,"fetchStart":125.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":125.59999990463257,"responseEnd":273.59999990463257,"responseStart":273.59999990463257,"secureConnectionStart":125.59999990463257},{"duration":350.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":125.70000004768372,"connectEnd":125.70000004768372,"connectStart":125.70000004768372,"domainLookupEnd":125.70000004768372,"domainLookupStart":125.70000004768372,"fetchStart":125.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":125.70000004768372,"responseEnd":476,"responseStart":476,"secureConnectionStart":125.70000004768372},{"duration":353.7000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":125.79999995231628,"connectEnd":125.79999995231628,"connectStart":125.79999995231628,"domainLookupEnd":125.79999995231628,"domainLookupStart":125.79999995231628,"fetchStart":125.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":125.79999995231628,"responseEnd":479.5,"responseStart":479.5,"secureConnectionStart":125.79999995231628},{"duration":354,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":125.89999985694885,"connectEnd":125.89999985694885,"connectStart":125.89999985694885,"domainLookupEnd":125.89999985694885,"domainLookupStart":125.89999985694885,"fetchStart":125.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":125.89999985694885,"responseEnd":479.89999985694885,"responseStart":479.89999985694885,"secureConnectionStart":125.89999985694885},{"duration":354.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":126,"connectEnd":126,"connectStart":126,"domainLookupEnd":126,"domainLookupStart":126,"fetchStart":126,"redirectEnd":0,"redirectStart":0,"requestStart":126,"responseEnd":480.2999999523163,"responseStart":480.2999999523163,"secureConnectionStart":126},{"duration":354.60000014305115,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":126.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":126.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":480.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":354.60000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":126.09999990463257,"connectEnd":126.09999990463257,"connectStart":126.09999990463257,"domainLookupEnd":126.09999990463257,"domainLookupStart":126.09999990463257,"fetchStart":126.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":126.09999990463257,"responseEnd":480.7000000476837,"responseStart":480.7000000476837,"secureConnectionStart":126.09999990463257},{"duration":354.90000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/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":126.29999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":126.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":481.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":355,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/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":126.39999985694885,"connectEnd":126.39999985694885,"connectStart":126.39999985694885,"domainLookupEnd":126.39999985694885,"domainLookupStart":126.39999985694885,"fetchStart":126.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":126.39999985694885,"responseEnd":481.39999985694885,"responseStart":481.39999985694885,"secureConnectionStart":126.39999985694885},{"duration":732.9000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":127.39999985694885,"connectEnd":127.39999985694885,"connectStart":127.39999985694885,"domainLookupEnd":127.39999985694885,"domainLookupStart":127.39999985694885,"fetchStart":127.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":127.39999985694885,"responseEnd":860.2999999523163,"responseStart":860.2999999523163,"secureConnectionStart":127.39999985694885},{"duration":733.3000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":127.39999985694885,"connectEnd":127.39999985694885,"connectStart":127.39999985694885,"domainLookupEnd":127.39999985694885,"domainLookupStart":127.39999985694885,"fetchStart":127.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":127.39999985694885,"responseEnd":860.7000000476837,"responseStart":860.7000000476837,"secureConnectionStart":127.39999985694885},{"duration":177.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":423.09999990463257,"connectEnd":423.09999990463257,"connectStart":423.09999990463257,"domainLookupEnd":423.09999990463257,"domainLookupStart":423.09999990463257,"fetchStart":423.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":423.09999990463257,"responseEnd":600.5999999046326,"responseStart":600.5999999046326,"secureConnectionStart":423.09999990463257},{"duration":115.10000014305115,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bu7/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":746.0999999046326,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":746.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":861.2000000476837,"responseStart":0,"secureConnectionStart":0}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":9,"responseStart":120,"responseEnd":122,"domLoading":123,"domInteractive":956,"domContentLoadedEventStart":956,"domContentLoadedEventEnd":1002,"domComplete":1316,"loadEventStart":1316,"loadEventEnd":1317,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":934.2999999523163},{"name":"bigPipe.sidebar-id.end","time":934.8999998569489},{"name":"bigPipe.activity-panel-pipe-id.start","time":935.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":936.3999998569489},{"name":"activityTabFullyLoaded","time":1015.0999999046326}],"measures":[],"correlationId":"c1ce59fadbfa6d","effectiveType":"4g","downlink":9.7,"rtt":0,"serverDuration":63,"dbReadsTimeInMs":9,"dbConnsTimeInMs":15,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
This is, actually, pretty easy.
Look in TABLE_SHARE::init_from_binary_frm_image() in 10.0.
All you need to do is to remove data structures that it creates, and
replace them with printf's. And you'll have a standalone frm parser.