 <p>what happens if you change it to: </p> <pre><code>select info1, info2, info3, id from profile_info where id = new.id into @i1, @i2, @i3, @id; If @id is null THEN insert into profile_info (id) values (new.id); ELSE set new.info1 = @i1; set new.info2 = @i2; set new.info3 = @i3; END IF; </code></pre>