{"id":1849,"date":"2010-03-16T15:35:03","date_gmt":"2010-03-16T05:35:03","guid":{"rendered":"http:\/\/www.flamingspork.com\/blog\/?p=1849"},"modified":"2010-03-16T15:35:03","modified_gmt":"2010-03-16T05:35:03","slug":"embedded-innodb-querying-the-configuration","status":"publish","type":"post","link":"https:\/\/www.flamingspork.com\/blog\/2010\/03\/16\/embedded-innodb-querying-the-configuration\/","title":{"rendered":"Embedded InnoDB: querying the configuration"},"content":{"rendered":"<p>I am rather excited about being able to do awesome things such as this to get the <strong>current<\/strong> configuration of your server:<\/p>\n<pre>drizzle> SELECT NAME,VALUE \r\n    -> FROM DATA_DICTIONARY.INNODB_CONFIGURATION\r\n    ->  WHERE NAME IN (\"data_file_path\", \"data_home_dir\");\r\n+----------------+-------+\r\n| NAME           | VALUE |\r\n+----------------+-------+\r\n| data_file_path | NULL  | \r\n| data_home_dir  | .\/    | \r\n+----------------+-------+\r\n2 rows in set (0 sec)\r\n\r\ndrizzle> SELECT NAME,VALUE\r\n    -> FROM DATA_DICTIONARY.INNODB_CONFIGURATION\r\n    -> WHERE NAME IN (\"data_file_path\", \"data_home_dir\");\r\n+----------------+-------+\r\n| NAME           | VALUE |\r\n+----------------+-------+\r\n| data_file_path | NULL  | \r\n| data_home_dir  | .\/    | \r\n+----------------+-------+\r\n2 rows in set (0 sec)\r\n\r\ndrizzle> SELECT NAME,VALUE \r\n    -> FROM DATA_DICTIONARY.INNODB_CONFIGURATION \r\n    -> WHERE NAME = \"io_capacity\";\r\n+-------------+-------+\r\n| NAME        | VALUE |\r\n+-------------+-------+\r\n| io_capacity | 200   | \r\n+-------------+-------+\r\n1 row in set (0 sec)\r\n<\/pre>\n<p>Coming soon: status in a table.<\/p>\n<p>(this is for the upcoming embedded_innodb plugin, which using the API provided by Embedded InnoDB to implement a Storage Engine for Drizzle)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am rather excited about being able to do awesome things such as this to get the current configuration of your server: drizzle> SELECT NAME,VALUE -> FROM DATA_DICTIONARY.INNODB_CONFIGURATION -> WHERE NAME IN (&#8220;data_file_path&#8221;, &#8220;data_home_dir&#8221;); +&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;-+ | NAME | VALUE | &hellip; <a href=\"https:\/\/www.flamingspork.com\/blog\/2010\/03\/16\/embedded-innodb-querying-the-configuration\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[75],"tags":[259,70,257,258,109,242],"class_list":["post-1849","post","type-post","status-publish","format-standard","hentry","category-drizzle-work-et-al","tag-data_dictionary","tag-drizzle","tag-innodb","tag-libinnodb","tag-sql","tag-storageengine"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5a6n8-tP","jetpack-related-posts":[{"id":1853,"url":"https:\/\/www.flamingspork.com\/blog\/2010\/03\/16\/embedded-innodb-innodb-status\/","url_meta":{"origin":1849,"position":0},"title":"Embedded InnoDB: InnoDB Status","author":"Stewart Smith","date":"2010-03-16","format":false,"excerpt":"Using the Embedded InnoDB plugin I'm working on, you can use the INNODB_STATUS table function in the data_dictionary, you can do pretty neat things. For example, we can see that each autocommit transaction causes an fsync and if you insert multiple rows ina \u00c2\u00a0single statement, you still only get 1\u2026","rel":"","context":"In &quot;drizzle&quot;","block_context":{"text":"drizzle","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/drizzle-work-et-al\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1383,"url":"https:\/\/www.flamingspork.com\/blog\/2009\/02\/02\/row-id-in-mysql-and-drizzle-and-the-engines\/","url_meta":{"origin":1849,"position":1},"title":"row id in MySQL and Drizzle (and the engines)","author":"Stewart Smith","date":"2009-02-02","format":false,"excerpt":"Some database engines have a fundamental concept of a row id. The row id is everything you need to know to locate a row. Common uses include secondary indexes (key is what's indexed, value is rowid which you then use to lookup the row). One design is the InnoDB method\u2026","rel":"","context":"In &quot;drizzle&quot;","block_context":{"text":"drizzle","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/drizzle-work-et-al\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1903,"url":"https:\/\/www.flamingspork.com\/blog\/2010\/04\/21\/storage-engine-api-write_row-create-select-and-ddl\/","url_meta":{"origin":1849,"position":2},"title":"Storage Engine API: write_row, CREATE SELECT and DDL","author":"Stewart Smith","date":"2010-04-21","format":false,"excerpt":"(this probably applies exactly the same for MySQL and Drizzle... but I'm just speaking about current Drizzle here) In my current merge request for the embedded-innodb\u00ef\u00bb\u00bf-create-select-transaction-arrgh branch (also see this specific revision), you'll notice an odd hoop that we have to jump through to make CREATE SELECT statements work with\u2026","rel":"","context":"In &quot;drizzle&quot;","block_context":{"text":"drizzle","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/drizzle-work-et-al\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2362,"url":"https:\/\/www.flamingspork.com\/blog\/2011\/04\/21\/http-json-alsosql-interface-to-drizzle\/","url_meta":{"origin":1849,"position":3},"title":"HTTP JSON AlsoSQL interface to Drizzle","author":"Stewart Smith","date":"2011-04-21","format":false,"excerpt":"So... I had another one of those \"hrrm... this shouldn't be hard to hack a proof-of-concept\" moments. Web apps are increasingly speaking JSON all around the place. Why can't we speak JSON to\/from the database? Why? Seriously, why not? One reason why MongoDB has found users is that JSON is\u2026","rel":"","context":"In &quot;drizzle&quot;","block_context":{"text":"drizzle","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/drizzle-work-et-al\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/04\/Screenshot-11-300x230.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1262,"url":"https:\/\/www.flamingspork.com\/blog\/2008\/11\/22\/drop-table-fail-on-the-road-to-removing-the-frm\/","url_meta":{"origin":1849,"position":4},"title":"drop table fail (on the road to removing the FRM)","author":"Stewart Smith","date":"2008-11-22","format":false,"excerpt":"So... in removing the FRM file in Drizzle, I found a bit of a nugget on how drop table works (currently in the MySQL server and now \"did\" in Drizzle). If you DROP TABLE t1; this is what happens open the .frm file read first 10bytes (oh, and if you\u2026","rel":"","context":"In &quot;drizzle&quot;","block_context":{"text":"drizzle","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/drizzle-work-et-al\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1874,"url":"https:\/\/www.flamingspork.com\/blog\/2010\/03\/30\/storing-the-table-message-in-embedded-innodb\/","url_meta":{"origin":1849,"position":5},"title":"Storing the table message in Embedded InnoDB","author":"Stewart Smith","date":"2010-03-30","format":false,"excerpt":"One of the exciting things[1] about working on a storage engine in Drizzle is that you get to manage your own metadata. When the database engine you're writing the storage engine interface for has a pretty complete data dictionary (e.g. Embedded InnoDB) you could just directly use it. At some\u2026","rel":"","context":"In &quot;drizzle&quot;","block_context":{"text":"drizzle","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/drizzle-work-et-al\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/1849","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/comments?post=1849"}],"version-history":[{"count":3,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/1849\/revisions"}],"predecessor-version":[{"id":1852,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/1849\/revisions\/1852"}],"wp:attachment":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/media?parent=1849"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/categories?post=1849"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/tags?post=1849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}