title: my trigger inserts way to many records
body: <p>I have the following trigger:</p>
  
  <pre><code>    begin
   insert into user_has_competence (user_id,competence_id)
   select u.id,c.id from competence c
   join user u on u.organization_id = c.organization_id and c.organization_id = new.organization_id;
  end
  </code></pre>
  
  <p>The tables involved are the following:</p>
  
  <pre><code>    Table: competence
  Columns:
  id  int(11) AI PK
  name    varchar(400)
  organization_id int(11)
  competence_type_id  int(11)
  competence_category_id  int(11)
  
  
  Table: user
  Columns:
  id  int(11) AI PK
  username    varchar(100)
  password    varchar(100)
  is_active   int(11)
  user_type_id    int(11)
  token   varchar(445)
  organization_id int(11)
  title_id    int(11)
  image_path  varchar(100)
  division_id int(11)
  
      Table: user_has_competence
  Columns:
  user_id int(11) PK
  competence_id   int(11) PK
  competence_level_id int(11)
  progression varchar(45)
  id  int(11) AI PK
  </code></pre>
  
  <p>now i have 8 users and when i insert 64 <code>competence</code> then i end up inserting over 30k rows into <code>user_has_competence</code></p>
  
  <p>Can anyone tell me why this is happening??</p>
  
  <p>To more precis it inserts 626433 rows.</p>