<br />
<b>Notice</b>:  Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>breadcrumb-navxt</code> domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the <code>init</code> action or later. Please see <a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in <b>/home/devtools/public_html/blog/wp-includes/functions.php</b> on line <b>6131</b><br />
{"id":428,"date":"2014-12-04T18:33:00","date_gmt":"2014-12-04T21:33:00","guid":{"rendered":""},"modified":"2022-05-03T11:07:19","modified_gmt":"2022-05-03T14:07:19","slug":"error-1363-there-is-no-old-row-in-on-insert-trigger","status":"publish","type":"post","link":"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/","title":{"rendered":"ERROR 1363: There is no OLD row in on INSERT trigger"},"content":{"rendered":"<div style=\"clear: both; text-align: center;\">\n<figure style=\"width: 118px\" class=\"wp-caption alignnone\"><a style=\"clear: left; float: left; margin-bottom: 1em; margin-right: 1em;\" href=\"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2014\/12\/erro.png\"><img decoding=\"async\" title=\"ERROR 1363: There is no OLD row in on INSERT trigger\" src=\"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2014\/12\/erro.png\" alt=\"Quadrado vermelho com a letra X dentro na cor branca.\" width=\"128\" height=\"128\" border=\"0\" \/><\/a><figcaption class=\"wp-caption-text\">ERROR 1363: There is no OLD row in on INSERT trigger<\/figcaption><\/figure>\n<\/div>\n<p>Nesta semana o colega Glauber Hofman\u00a0me pediu um apoio na cria\u00e7\u00e3o de um trigger, ele estava tendo dificuldades na hora de inserir registros na tabela que o trigger estava vinculado, no entanto, o gatilho j\u00e1 havia compilado no banco de dados.<\/p>\n<p>O erro apresentado pelo MySQL era:<\/p>\n<pre><i>ERROR 1363: There is no OLD row in on INSERT trigger<\/i><\/pre>\n<p>O trigger em quest\u00e3o &#8220;deveria&#8221; inserir na tabela de log os registros antigos <span style=\"font-size: x-small;\">(<i>old<\/i>)<\/span> depois <span style=\"font-size: x-small;\">(<i>after<\/i>)<\/span> da inser\u00e7\u00e3o <span style=\"font-size: x-small;\">(<i>insert<\/i>)<\/span>. Como mencionei, o trigger compilou sem problemas, s\u00f3 que ao momento em que um registro era inserido na tabela, o erro acima era apresentado.<\/p>\n<h4>O motivo do erro?<\/h4>\n<p>No insert n\u00e3o temos um valor antigo, somente o novo valor que ser\u00e1 registrado, desta forma o banco de dados nos alerta atrav\u00e9s do erro 1363 que, n\u00e3o \u00e9 poss\u00edvel se ter um valor antigo para um novo registro.<\/p>\n<p>De forma semelhante, tamb\u00e9m podemos ter o erro:<\/p>\n<pre><i>ERROR 1363: There is no NEW row in on DELETE trigger<\/i><\/pre>\n<p>Neste formato, temos um trigger tentando inserir um registro novo ap\u00f3s um delete, algo que n\u00e3o existe, afinal, o novo registro &#8220;sumiu&#8221;.<\/p>\n<h4>A solu\u00e7\u00e3o?<\/h4>\n<p>Para resolver o problema no caso do insert, troque o after por before, e o old, por new.<\/p>\n<p>J\u00e1 para o delete, use o before e, troque o new pelo old.<\/p>\n<p>Se ainda ficou na d\u00favida, quer agradecer (me dar $$), poste seu coment\u00e1rio, terei o maior prazer em responder.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nesta semana o colega Glauber Hofman\u00a0me pediu um apoio na cria\u00e7\u00e3o de um trigger, ele estava tendo dificuldades na hora de inserir registros na tabela que o trigger estava vinculado, no entanto, o gatilho j\u00e1 havia compilado no banco de dados. O erro apresentado pelo MySQL era: ERROR 1363: There is no OLD row in &#8230; <a title=\"ERROR 1363: There is no OLD row in on INSERT trigger\" class=\"read-more\" href=\"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/\" aria-label=\"More on ERROR 1363: There is no OLD row in on INSERT trigger\">Ler mais<\/a><\/p>\n","protected":false},"author":1,"featured_media":564,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49],"tags":[],"class_list":["post-428","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mysql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>ERROR 1363: There is no OLD row in on INSERT trigger<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ERROR 1363: There is no OLD row in on INSERT trigger\" \/>\n<meta property=\"og:description\" content=\"Nesta semana o colega Glauber Hofman\u00a0me pediu um apoio na cria\u00e7\u00e3o de um trigger, ele estava tendo dificuldades na hora de inserir registros na tabela que o trigger estava vinculado, no entanto, o gatilho j\u00e1 havia compilado no banco de dados. O erro apresentado pelo MySQL era: ERROR 1363: There is no OLD row in ... Ler mais\" \/>\n<meta property=\"og:url\" content=\"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/\" \/>\n<meta property=\"og:site_name\" content=\"Devtools\" \/>\n<meta property=\"article:published_time\" content=\"2014-12-04T21:33:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-05-03T14:07:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2014\/12\/erro.png\" \/>\n\t<meta property=\"og:image:width\" content=\"128\" \/>\n\t<meta property=\"og:image:height\" content=\"128\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Fabiano Abreu\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fabiano Abreu\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. tempo de leitura\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/\"},\"author\":{\"name\":\"Fabiano Abreu\",\"@id\":\"https:\/\/devtools.com.br\/blog\/#\/schema\/person\/aa3425fdfdefa404466fc49f6d122eed\"},\"headline\":\"ERROR 1363: There is no OLD row in on INSERT trigger\",\"datePublished\":\"2014-12-04T21:33:00+00:00\",\"dateModified\":\"2022-05-03T14:07:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/\"},\"wordCount\":252,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\/\/devtools.com.br\/blog\/#\/schema\/person\/aa3425fdfdefa404466fc49f6d122eed\"},\"image\":{\"@id\":\"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2014\/12\/erro.png\",\"articleSection\":[\"MySQL\"],\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/\",\"url\":\"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/\",\"name\":\"ERROR 1363: There is no OLD row in on INSERT trigger\",\"isPartOf\":{\"@id\":\"https:\/\/devtools.com.br\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2014\/12\/erro.png\",\"datePublished\":\"2014-12-04T21:33:00+00:00\",\"dateModified\":\"2022-05-03T14:07:19+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/#primaryimage\",\"url\":\"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2014\/12\/erro.png\",\"contentUrl\":\"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2014\/12\/erro.png\",\"width\":128,\"height\":128,\"caption\":\"ERROR 1363: There is no OLD row in on INSERT trigger\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\/\/devtools.com.br\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ERROR 1363: There is no OLD row in on INSERT trigger\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/devtools.com.br\/blog\/#website\",\"url\":\"https:\/\/devtools.com.br\/blog\/\",\"name\":\"Devtools\",\"description\":\"Sua caixa de ferramentas online\",\"publisher\":{\"@id\":\"https:\/\/devtools.com.br\/blog\/#\/schema\/person\/aa3425fdfdefa404466fc49f6d122eed\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/devtools.com.br\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-BR\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/devtools.com.br\/blog\/#\/schema\/person\/aa3425fdfdefa404466fc49f6d122eed\",\"name\":\"Fabiano Abreu\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\/\/devtools.com.br\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2022\/07\/Fabiano-Abreu.png\",\"contentUrl\":\"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2022\/07\/Fabiano-Abreu.png\",\"width\":184,\"height\":184,\"caption\":\"Fabiano Abreu\"},\"logo\":{\"@id\":\"https:\/\/devtools.com.br\/blog\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/devtools.com.br\/blog\"],\"url\":\"https:\/\/devtools.com.br\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"ERROR 1363: There is no OLD row in on INSERT trigger","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/","og_locale":"pt_BR","og_type":"article","og_title":"ERROR 1363: There is no OLD row in on INSERT trigger","og_description":"Nesta semana o colega Glauber Hofman\u00a0me pediu um apoio na cria\u00e7\u00e3o de um trigger, ele estava tendo dificuldades na hora de inserir registros na tabela que o trigger estava vinculado, no entanto, o gatilho j\u00e1 havia compilado no banco de dados. O erro apresentado pelo MySQL era: ERROR 1363: There is no OLD row in ... Ler mais","og_url":"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/","og_site_name":"Devtools","article_published_time":"2014-12-04T21:33:00+00:00","article_modified_time":"2022-05-03T14:07:19+00:00","og_image":[{"width":128,"height":128,"url":"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2014\/12\/erro.png","type":"image\/png"}],"author":"Fabiano Abreu","twitter_card":"summary_large_image","twitter_misc":{"Escrito por":"Fabiano Abreu","Est. tempo de leitura":"2 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/#article","isPartOf":{"@id":"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/"},"author":{"name":"Fabiano Abreu","@id":"https:\/\/devtools.com.br\/blog\/#\/schema\/person\/aa3425fdfdefa404466fc49f6d122eed"},"headline":"ERROR 1363: There is no OLD row in on INSERT trigger","datePublished":"2014-12-04T21:33:00+00:00","dateModified":"2022-05-03T14:07:19+00:00","mainEntityOfPage":{"@id":"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/"},"wordCount":252,"commentCount":4,"publisher":{"@id":"https:\/\/devtools.com.br\/blog\/#\/schema\/person\/aa3425fdfdefa404466fc49f6d122eed"},"image":{"@id":"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/#primaryimage"},"thumbnailUrl":"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2014\/12\/erro.png","articleSection":["MySQL"],"inLanguage":"pt-BR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/","url":"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/","name":"ERROR 1363: There is no OLD row in on INSERT trigger","isPartOf":{"@id":"https:\/\/devtools.com.br\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/#primaryimage"},"image":{"@id":"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/#primaryimage"},"thumbnailUrl":"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2014\/12\/erro.png","datePublished":"2014-12-04T21:33:00+00:00","dateModified":"2022-05-03T14:07:19+00:00","breadcrumb":{"@id":"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/"]}]},{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/#primaryimage","url":"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2014\/12\/erro.png","contentUrl":"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2014\/12\/erro.png","width":128,"height":128,"caption":"ERROR 1363: There is no OLD row in on INSERT trigger"},{"@type":"BreadcrumbList","@id":"https:\/\/devtools.com.br\/blog\/error-1363-there-is-no-old-row-in-on-insert-trigger\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/devtools.com.br\/blog\/"},{"@type":"ListItem","position":2,"name":"ERROR 1363: There is no OLD row in on INSERT trigger"}]},{"@type":"WebSite","@id":"https:\/\/devtools.com.br\/blog\/#website","url":"https:\/\/devtools.com.br\/blog\/","name":"Devtools","description":"Sua caixa de ferramentas online","publisher":{"@id":"https:\/\/devtools.com.br\/blog\/#\/schema\/person\/aa3425fdfdefa404466fc49f6d122eed"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/devtools.com.br\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-BR"},{"@type":["Person","Organization"],"@id":"https:\/\/devtools.com.br\/blog\/#\/schema\/person\/aa3425fdfdefa404466fc49f6d122eed","name":"Fabiano Abreu","image":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/devtools.com.br\/blog\/#\/schema\/person\/image\/","url":"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2022\/07\/Fabiano-Abreu.png","contentUrl":"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2022\/07\/Fabiano-Abreu.png","width":184,"height":184,"caption":"Fabiano Abreu"},"logo":{"@id":"https:\/\/devtools.com.br\/blog\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/devtools.com.br\/blog"],"url":"https:\/\/devtools.com.br\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/devtools.com.br\/blog\/wp-json\/wp\/v2\/posts\/428","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devtools.com.br\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devtools.com.br\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devtools.com.br\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/devtools.com.br\/blog\/wp-json\/wp\/v2\/comments?post=428"}],"version-history":[{"count":4,"href":"https:\/\/devtools.com.br\/blog\/wp-json\/wp\/v2\/posts\/428\/revisions"}],"predecessor-version":[{"id":1470,"href":"https:\/\/devtools.com.br\/blog\/wp-json\/wp\/v2\/posts\/428\/revisions\/1470"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devtools.com.br\/blog\/wp-json\/wp\/v2\/media\/564"}],"wp:attachment":[{"href":"https:\/\/devtools.com.br\/blog\/wp-json\/wp\/v2\/media?parent=428"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devtools.com.br\/blog\/wp-json\/wp\/v2\/categories?post=428"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devtools.com.br\/blog\/wp-json\/wp\/v2\/tags?post=428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}