{"id":6034,"date":"2013-01-28T15:27:58","date_gmt":"2013-01-28T13:27:58","guid":{"rendered":"http:\/\/code.openark.org\/blog\/?p=6034"},"modified":"2013-01-28T15:27:58","modified_gmt":"2013-01-28T13:27:58","slug":"looking-for-a-hack-share-data-between-mysql-sessions","status":"publish","type":"post","link":"https:\/\/code.openark.org\/blog\/mysql\/looking-for-a-hack-share-data-between-mysql-sessions","title":{"rendered":"Looking for a hack: share data between MySQL sessions"},"content":{"rendered":"<p>I&#8217;m looking for a way to share data between two MySQL connections\/sessions. Obviously tables are the trivial answer, but for reasons of security (possibly insufficient privileges) I wish to avoid that.<\/p>\n<p>The type of data to be passed can vary. Ideally I would be able to pass multiple pieces of information (dates, texts, integers, etc.) around. If impossible, I would do with texts only, and if impossible yet, I could do with a single text (but reasonably long).<\/p>\n<p>There is a way to do so: by writing to the file system (<strong>SELECT INTO OUTFILE<\/strong> + <strong>LOAD_FILE()<\/strong>). However I wish to avoid it, since writing to files from within MySQL requires creation of a new file each time; no overwrite and no purging; this litters the file system.<\/p>\n<p>So: any other tricks? Is there some way to pass data via <strong>GET_LOCK()<\/strong>\/<strong>RELEASE_LOCK()<\/strong> (none that I can see other than Morse code)?<\/p>\n<p>Is there some global variable that is unused, can be changed dynamically, and has enough space? (I couldn&#8217;t find one)<\/p>\n<p>I appreciate any input.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m looking for a way to share data between two MySQL connections\/sessions. Obviously tables are the trivial answer, but for reasons of security (possibly insufficient privileges) I wish to avoid that. The type of data to be passed can vary. Ideally I would be able to pass multiple pieces of information (dates, texts, integers, etc.) [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_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":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[5],"tags":[74],"class_list":["post-6034","post","type-post","status-publish","format-standard","hentry","category-mysql","tag-hack"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2bZZp-1zk","_links":{"self":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts\/6034","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/comments?post=6034"}],"version-history":[{"count":1,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts\/6034\/revisions"}],"predecessor-version":[{"id":6035,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts\/6034\/revisions\/6035"}],"wp:attachment":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/media?parent=6034"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/categories?post=6034"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/tags?post=6034"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}