title: request mysql with rank result different for same request
body: <p>not the same result of request when it run the first time (cli sqlplus)
  first result 104 the @rank &lt; 6 is not taken</p>
  
  <p>then when I re-execute (2 or 3 or 4 time) the same request 
      second result 83 the @rank &lt; 6 is  taken</p>
  
  <p>the same request :</p>
  
  <pre><code>select count(*) 
  from (
      (select a.rank,a.g 
       from (
         SELECT t.* 
         FROM (
           select  @rank:= CASE WHEN @group = nom_toto THEN @rank +1 ELSE 1 END rank,
                   @group:= table.nom_toto g 
          from table  
          where sonde = 0
       ) t 
       WHERE t.rank &lt;=6
    ) a 
       left JOIN (
         select table.nom_toto 
         from service_list 
           join ...)
    ) f 
    group by f.nom_toto, f.rank,f.g;
  </code></pre>
  
  <p>why the first time the rank is not taken?</p>