title: What does "The following query failed" ";"" mean in MySQL?
body: <p>While trying to update a trigger, MySQL tells me the query ";" failed. How is ";" even a query in MySQL's view is beyond me.</p>
  
  <p>The exact message is:</p>
  
  <blockquote>
    <p>The following query has failed: ";" MySQL said: #1065 - Query was empty</p>
  </blockquote>
  
  <p>Here's the new trigger (AFTER INSERT):</p>
  
  <pre><code>BEGIN
  DECLARE vIdPlacet VARCHAR(40);
  DECLARE vTypeTravaux VARCHAR(32);
  DECLARE vEssence VARCHAR(3) DEFAULT '-';
  DECLARE vClasseHau VARCHAR(5) DEFAULT '-';
  DECLARE vNoMesurag int;
  
  DECLARE new_id_parcelle INT UNSIGNED DEFAULT 0;
  DECLARE new_no_microplacette INT UNSIGNED DEFAULT 0;
  
  IF NEW.deleted = 0 THEN
      SELECT id_parcelle, no_microplacette
      INTO new_id_parcelle, new_no_microplacette
      FROM microplacette
      WHERE id_microplacette = NEW.id_microplacette;
  
      SELECT travaux, no_mesurag, id__placet
      INTO vTypeTravaux, vNoMesurag, vIdPlacet
      FROM secteur
      LEFT JOIN parcelle ON secteur.id_secteur = parcelle.id_secteur
      WHERE id_parcelle = new_id_parcelle; 
  
      IF vTypeTravaux = 'inventaire' THEN
          SELECT abbreviation INTO vEssence FROM essences WHERE _id = NEW.id_essence;
  
  
          IF NEW.hauteur_15 = 1 THEN
              SET vClasseHau = '15CM+';
          END IF;
  
          IF (SELECT COUNT(*) FROM imported_pres_ess WHERE id__placet = vIdPlacet AND
                                                               caracteris = '-' AND
                                                               classe_hau = vClasseHau AND
                                                               essence = vEssence AND
                                                               no_mesurag = vNoMesurag AND
                                                               no_micro_p = new_no_microplacette) = 0 THEN
              INSERT INTO imported_pres_ess (id__placet, caracteris, classe_hau, essence, no_mesurag, no_micro_p)
                     VALUES (vIdPlacet, '-', vClasseHau, vEssence, vNoMesurag, new_no_microplacette);
          END IF; 
  
  
          IF (SELECT COUNT(*) FROM imported_semi_gau WHERE id__placet = vIdPlacet AND
                                                               classe_hau = vClasseHau AND
                                                               essence = vEssence AND
                                                               no_mesurag = vNoMesurag AND
                                                               no_micro_p = new_no_microplacette) = 0 THEN
              INSERT INTO imported_semi_gau (id__placet, classe_hau, essence, no_mesurag, no_micro_p)
                     VALUES (vIdPlacet, vClasseHau, vEssence, vNoMesurag, new_no_microplacette);
          END IF; 
  
  
          IF NEW.diametre &gt; 0 THEN
              SET vClasseHau = 'D2_D8';
          ELSE
              SET vClasseHau = '-';
          END IF;
  
          IF (SELECT COUNT(*) FROM imported_pres_ess WHERE id__placet = vIdPlacet AND
                                                               caracteris = '-' AND
                                                               classe_hau = vClasseHau AND
                                                               essence = vEssence AND
                                                               no_mesurag = vNoMesurag AND
                                                               no_micro_p = new_no_microplacette) = 0 THEN
              INSERT INTO imported_pres_ess (id__placet, caracteris, classe_hau, essence, no_mesurag, no_micro_p)
                     VALUES (vIdPlacet, '-', vClasseHau, vEssence, vNoMesurag, new_no_microplacette);
          END IF; 
  
  
          IF (SELECT COUNT(*) FROM imported_semi_gau WHERE id__placet = vIdPlacet AND
                                                               classe_hau = vClasseHau AND
                                                               essence = vEssence AND
                                                               no_mesurag = vNoMesurag AND
                                                               no_micro_p = new_no_microplacette) = 0 THEN
              INSERT INTO imported_semi_gau (id__placet, classe_hau, essence, no_mesurag, no_micro_p)
                     VALUES (vIdPlacet, vClasseHau, vEssence, vNoMesurag, new_no_microplacette);
          END IF; 
      END IF;
  END IF;
  END
  </code></pre>