~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/queues.cc

  • Committer: Brian Aker
  • Date: 2008-12-06 23:57:32 UTC
  • mfrom: (656.1.10 devel)
  • Revision ID: brian@tangent.org-20081206235732-jx228bczpvmxu8ww
Merge from Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
100
100
  if ((ret= init_queue(queue, max_elements, offset_to_key, max_at_top, compare,
101
101
                       first_cmp_arg)))
102
102
    return(ret);
103
 
  
 
103
 
104
104
  queue->auto_extent= auto_extent;
105
105
  return(0);
106
106
}
225
225
    0 - OK
226
226
    1 - Cannot allocate more memory
227
227
    2 - auto_extend is 0, the operation would
228
 
  
 
228
 
229
229
*/
230
230
 
231
231
int queue_insert_safe(register QUEUE *queue, unsigned char *element)
238
238
    else if (resize_queue(queue, queue->max_elements + queue->auto_extent))
239
239
      return 1;
240
240
  }
241
 
  
 
241
 
242
242
  queue_insert(queue, element);
243
243
  return 0;
244
244
}
288
288
                        queue->root[next_index+1]+offset_to_key) *
289
289
         queue->max_at_top) > 0)
290
290
      next_index++;
291
 
    if (first && 
 
291
    if (first &&
292
292
        (((queue->compare(queue->first_cmp_arg,
293
293
                          queue->root[next_index]+offset_to_key,
294
294
                          element+offset_to_key) * queue->max_at_top) >= 0)))
511
511
 
512
512
  expected_part= 1;
513
513
  expected_num= 1;
514
 
 
 
514
 
515
515
  if (max_ind)
516
516
    backward_start= 1 << 21;
517
517