~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_db.cc

  • Committer: Brian Aker
  • Date: 2008-10-06 05:57:49 UTC
  • Revision ID: brian@tangent.org-20081006055749-svg700gciuqi0zu1
Remove all of uchar.

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
  lock_db key.
63
63
*/
64
64
 
65
 
extern "C" uchar* lock_db_get_key(my_dblock_t *, size_t *, bool not_used);
 
65
extern "C" unsigned char* lock_db_get_key(my_dblock_t *, size_t *, bool not_used);
66
66
 
67
 
uchar* lock_db_get_key(my_dblock_t *ptr, size_t *length,
 
67
unsigned char* lock_db_get_key(my_dblock_t *ptr, size_t *length,
68
68
                       bool not_used __attribute__((unused)))
69
69
{
70
70
  *length= ptr->name_length;
71
 
  return (uchar*) ptr->name;
 
71
  return (unsigned char*) ptr->name;
72
72
}
73
73
 
74
74
 
93
93
  my_dblock_t *opt;
94
94
  safe_mutex_assert_owner(&LOCK_lock_db);
95
95
  if ((opt= (my_dblock_t *)hash_search(&lock_db_cache,
96
 
                                       (const uchar*) name, length)))
97
 
    hash_delete(&lock_db_cache, (uchar*) opt);
 
96
                                       (const unsigned char*) name, length)))
 
97
    hash_delete(&lock_db_cache, (unsigned char*) opt);
98
98
}
99
99
 
100
100
 
116
116
  Function we use in the creation of our hash to get key.
117
117
*/
118
118
 
119
 
extern "C" uchar* dboptions_get_key(my_dbopt_t *opt, size_t *length,
 
119
extern "C" unsigned char* dboptions_get_key(my_dbopt_t *opt, size_t *length,
120
120
                                    bool not_used);
121
121
 
122
 
uchar* dboptions_get_key(my_dbopt_t *opt, size_t *length,
 
122
unsigned char* dboptions_get_key(my_dbopt_t *opt, size_t *length,
123
123
                         bool not_used __attribute__((unused)))
124
124
{
125
125
  *length= opt->name_length;
126
 
  return (uchar*) opt->name;
 
126
  return (unsigned char*) opt->name;
127
127
}
128
128
 
129
129
 
150
150
 
151
151
void free_dbopt(void *dbopt)
152
152
{
153
 
  free((uchar*) dbopt);
 
153
  free((unsigned char*) dbopt);
154
154
}
155
155
 
156
156
 
243
243
  length= (uint) strlen(dbname);
244
244
  
245
245
  rw_rdlock(&LOCK_dboptions);
246
 
  if ((opt= (my_dbopt_t*) hash_search(&dboptions, (uchar*) dbname, length)))
 
246
  if ((opt= (my_dbopt_t*) hash_search(&dboptions, (unsigned char*) dbname, length)))
247
247
  {
248
248
    create->default_table_charset= opt->charset;
249
249
    error= true;
274
274
  length= (uint) strlen(dbname);
275
275
  
276
276
  rw_wrlock(&LOCK_dboptions);
277
 
  if (!(opt= (my_dbopt_t*) hash_search(&dboptions, (uchar*) dbname, length)))
 
277
  if (!(opt= (my_dbopt_t*) hash_search(&dboptions, (unsigned char*) dbname, length)))
278
278
  { 
279
279
    /* Options are not in the hash, insert them */
280
280
    char *tmp_name;
290
290
    my_stpcpy(opt->name, dbname);
291
291
    opt->name_length= length;
292
292
    
293
 
    if ((error= my_hash_insert(&dboptions, (uchar*) opt)))
 
293
    if ((error= my_hash_insert(&dboptions, (unsigned char*) opt)))
294
294
    {
295
295
      free(opt);
296
296
      goto end;
314
314
{
315
315
  my_dbopt_t *opt;
316
316
  rw_wrlock(&LOCK_dboptions);
317
 
  if ((opt= (my_dbopt_t *)hash_search(&dboptions, (const uchar*) path,
 
317
  if ((opt= (my_dbopt_t *)hash_search(&dboptions, (const unsigned char*) path,
318
318
                                      strlen(path))))
319
 
    hash_delete(&dboptions, (uchar*) opt);
 
319
    hash_delete(&dboptions, (unsigned char*) opt);
320
320
  rw_unlock(&LOCK_dboptions);
321
321
}
322
322