~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/lock.cc

  • Committer: Brian Aker
  • Date: 2008-08-05 04:10:42 UTC
  • mfrom: (261.2.8 codestyle)
  • mto: This revision was merged to the branch mainline in revision 263.
  • Revision ID: brian@tangent.org-20080805041042-1l4893r3bwy2lxz2
Merge from Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
515
515
        removed_locks= table->lock_count;
516
516
 
517
517
        /* Move down all table pointers above 'i'. */
518
 
        memcpy((char*) (locked->table+i),
519
 
               (char*) (locked->table+i+1),
 
518
        memcpy((locked->table+i), (locked->table+i+1),
520
519
               (old_tables - i) * sizeof(TABLE*));
521
520
 
522
521
        lock_data_end= table->lock_data_start + table->lock_count;
523
522
        /* Move down all lock data pointers above 'table->lock_data_end-1' */
524
 
        memcpy((char*) (locked->locks + table->lock_data_start),
525
 
               (char*) (locked->locks + lock_data_end),
 
523
        memcpy((locked->locks + table->lock_data_start),
 
524
               (locked->locks + lock_data_end),
526
525
               (locked->lock_count - lock_data_end) *
527
526
               sizeof(THR_LOCK_DATA*));
528
527
 
637
636
         b->lock_count*sizeof(*b->locks));
638
637
  memcpy(sql_lock->table,a->table,a->table_count*sizeof(*a->table));
639
638
  memcpy(sql_lock->table+a->table_count,b->table,
640
 
         b->table_count*sizeof(*b->table));
 
639
         b->table_count*sizeof(*b->table));
641
640
 
642
641
  /*
643
642
    Now adjust lock_position and lock_data_start for all objects that was
1635
1634
{
1636
1635
  TABLE_LIST    *tlist;
1637
1636
  int           result= 0;
1638
 
  char          warn_buff[MYSQL_ERRMSG_SIZE];
 
1637
  char          warn_buff[DRIZZLE_ERRMSG_SIZE];
1639
1638
 
1640
1639
  for (tlist= table_list; tlist; tlist= tlist->next_global)
1641
1640
  {
1671
1670
    /* Warn about the conversion. */
1672
1671
    snprintf(warn_buff, sizeof(warn_buff), ER(ER_WARN_AUTO_CONVERT_LOCK),
1673
1672
             tlist->alias ? tlist->alias : tlist->table_name);
1674
 
    push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
 
1673
    push_warning(thd, DRIZZLE_ERROR::WARN_LEVEL_WARN,
1675
1674
                 ER_WARN_AUTO_CONVERT_LOCK, warn_buff);
1676
1675
  }
1677
1676