{"id":97,"date":"2010-01-26T16:07:12","date_gmt":"2010-01-26T22:07:12","guid":{"rendered":"http:\/\/thenoyes.com\/littlenoise\/?p=97"},"modified":"2010-01-26T16:07:12","modified_gmt":"2010-01-26T22:07:12","slug":"trigger-on-firing-table","status":"publish","type":"post","link":"https:\/\/thenoyes.com\/littlenoise\/?p=97","title":{"rendered":"Trigger on firing table"},"content":{"rendered":"<pre>\r\nCREATE TABLE t1 (id int);\r\nCREATE TRIGGER t1_ai AFTER INSERT ON t1 FOR EACH ROW \r\n  INSERT INTO t1 VALUES (NEW.id);\r\n<\/pre>\n<p>That&#8217;s not allowed; it won&#8217;t let you create the trigger.<\/p>\n<pre>CREATE TABLE t1 (id int);\r\nCREATE TABLE f1 (id int) ENGINE=FEDERATED CONNECTION='localhost\/test\/t1';\r\nCREATE TRIGGER t1_ai AFTER INSERT ON t1 FOR EACH ROW \r\n  INSERT INTO f1 VALUES (NEW.id);<\/pre>\n<p>The server lets that through. Don&#8217;t do it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CREATE TABLE t1 (id int); CREATE TRIGGER t1_ai AFTER INSERT ON t1 FOR EACH ROW INSERT INTO t1 VALUES (NEW.id); That&#8217;s not allowed; it won&#8217;t let you create the trigger. CREATE TABLE t1 (id int); CREATE TABLE f1 (id int) ENGINE=FEDERATED CONNECTION=&#8217;localhost\/test\/t1&#8242;; CREATE TRIGGER t1_ai AFTER INSERT ON t1 FOR EACH ROW INSERT INTO f1 [&hellip;]<\/p>\n","protected":false},"author":1,"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":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4],"tags":[],"class_list":["post-97","post","type-post","status-publish","format-standard","hentry","category-mysql"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p2IBF1-1z","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/thenoyes.com\/littlenoise\/index.php?rest_route=\/wp\/v2\/posts\/97","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thenoyes.com\/littlenoise\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thenoyes.com\/littlenoise\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thenoyes.com\/littlenoise\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thenoyes.com\/littlenoise\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=97"}],"version-history":[{"count":0,"href":"https:\/\/thenoyes.com\/littlenoise\/index.php?rest_route=\/wp\/v2\/posts\/97\/revisions"}],"wp:attachment":[{"href":"https:\/\/thenoyes.com\/littlenoise\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=97"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thenoyes.com\/littlenoise\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=97"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thenoyes.com\/littlenoise\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=97"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}