~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/lock.cc

Merged build changes from Antony.

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
*/
75
75
 
76
76
#include "mysql_priv.h"
77
 
#include <hash.h>
 
77
#include <mysys/hash.h>
78
78
#include <assert.h>
79
79
 
80
80
/**
131
131
  @param flags Lock flags
132
132
  @return 0 if all the check passed, non zero if a check failed.
133
133
*/
134
 
int mysql_lock_tables_check(THD *thd __attribute__((__unused__)),
 
134
int mysql_lock_tables_check(THD *thd __attribute__((unused)),
135
135
                            TABLE **tables, uint count,
136
 
                            uint flags __attribute__((__unused__)))
 
136
                            uint flags __attribute__((unused)))
137
137
{
138
138
  uint system_count;
139
139
  uint i;
514
514
        removed_locks= table->lock_count;
515
515
 
516
516
        /* Move down all table pointers above 'i'. */
517
 
        bmove((char*) (locked->table+i),
518
 
              (char*) (locked->table+i+1),
519
 
              (old_tables - i) * sizeof(TABLE*));
 
517
        memcpy((char*) (locked->table+i),
 
518
               (char*) (locked->table+i+1),
 
519
               (old_tables - i) * sizeof(TABLE*));
520
520
 
521
521
        lock_data_end= table->lock_data_start + table->lock_count;
522
522
        /* Move down all lock data pointers above 'table->lock_data_end-1' */
523
 
        bmove((char*) (locked->locks + table->lock_data_start),
524
 
              (char*) (locked->locks + lock_data_end),
525
 
              (locked->lock_count - lock_data_end) *
526
 
              sizeof(THR_LOCK_DATA*));
 
523
        memcpy((char*) (locked->locks + table->lock_data_start),
 
524
               (char*) (locked->locks + lock_data_end),
 
525
               (locked->lock_count - lock_data_end) *
 
526
               sizeof(THR_LOCK_DATA*));
527
527
 
528
528
        /*
529
529
          Fix moved table elements.
1014
1014
}
1015
1015
 
1016
1016
 
1017
 
void unlock_table_name(THD *thd __attribute__((__unused__)),
 
1017
void unlock_table_name(THD *thd __attribute__((unused)),
1018
1018
                       TABLE_LIST *table_list)
1019
1019
{
1020
1020
  if (table_list->table)
1025
1025
}
1026
1026
 
1027
1027
 
1028
 
static bool locked_named_table(THD *thd __attribute__((__unused__)),
 
1028
static bool locked_named_table(THD *thd __attribute__((unused)),
1029
1029
                               TABLE_LIST *table_list)
1030
1030
{
1031
1031
  for (; table_list ; table_list=table_list->next_local)