~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_base.cc

  • Committer: Brian Aker
  • Date: 2008-09-28 03:20:53 UTC
  • mto: This revision was merged to the branch mainline in revision 413.
  • Revision ID: brian@tangent.org-20080928032053-rclc4iiwmwedsf73
Work on removing GNU specific calls.

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
uint create_table_def_key(THD *thd, char *key, TableList *table_list,
103
103
                          bool tmp_table)
104
104
{
105
 
  uint key_length= (uint) (stpcpy(stpcpy(key, table_list->db)+1,
 
105
  uint key_length= (uint) (my_stpcpy(my_stpcpy(key, table_list->db)+1,
106
106
                                  table_list->table_name)-key)+1;
107
107
  if (tmp_table)
108
108
  {
560
560
      open_list=0;                              // Out of memory
561
561
      break;
562
562
    }
563
 
    stpcpy((*start_list)->table=
564
 
           stpcpy(((*start_list)->db= (char*) ((*start_list)+1)),
 
563
    my_stpcpy((*start_list)->table=
 
564
           my_stpcpy(((*start_list)->db= (char*) ((*start_list)+1)),
565
565
                  share->db.str)+1,
566
566
           share->table_name.str);
567
567
    (*start_list)->in_use= entry->in_use ? 1 : 0;
1943
1943
  char key[MAX_DBKEY_LENGTH];
1944
1944
  uint key_length;
1945
1945
 
1946
 
  key_length= (uint)(stpcpy(stpcpy(key, db) + 1, table_name) - key) + 1;
 
1946
  key_length= (uint)(my_stpcpy(my_stpcpy(key, db) + 1, table_name) - key) + 1;
1947
1947
  VOID(pthread_mutex_lock(&LOCK_open));
1948
1948
 
1949
1949
  if (hash_search(&open_cache, (uchar *)key, key_length))
2482
2482
Table *find_locked_table(THD *thd, const char *db,const char *table_name)
2483
2483
{
2484
2484
  char  key[MAX_DBKEY_LENGTH];
2485
 
  uint key_length=(uint) (stpcpy(stpcpy(key,db)+1,table_name)-key)+1;
 
2485
  uint key_length=(uint) (my_stpcpy(my_stpcpy(key,db)+1,table_name)-key)+1;
2486
2486
 
2487
2487
  for (Table *table=thd->open_tables; table ; table=table->next)
2488
2488
  {
3205
3205
      if ((query= (char*) my_malloc(query_buf_size,MYF(MY_WME))))
3206
3206
      {
3207
3207
        /* this DELETE FROM is needed even with row-based binlogging */
3208
 
        end = strxmov(stpcpy(query, "DELETE FROM `"),
 
3208
        end = strxmov(my_stpcpy(query, "DELETE FROM `"),
3209
3209
                      share->db.str,"`.`",share->table_name.str,"`", NullS);
3210
3210
        thd->binlog_query(THD::STMT_QUERY_TYPE,
3211
3211
                          query, (ulong)(end-query), false, false);
3881
3881
 
3882
3882
  share= (TABLE_SHARE*) (tmp_table+1);
3883
3883
  tmp_path= (char*) (share+1);
3884
 
  saved_cache_key= stpcpy(tmp_path, path)+1;
 
3884
  saved_cache_key= my_stpcpy(tmp_path, path)+1;
3885
3885
  memcpy(saved_cache_key, cache_key, key_length);
3886
3886
 
3887
3887
  init_tmp_table_share(thd, share, saved_cache_key, key_length,
3939
3939
  handler *file;
3940
3940
  char *ext;
3941
3941
 
3942
 
  stpcpy(ext= strchr(path, '\0'), reg_ext);
 
3942
  my_stpcpy(ext= strchr(path, '\0'), reg_ext);
3943
3943
  if (my_delete(path,MYF(0)))
3944
3944
    error=1; /* purecov: inspected */
3945
3945
  *ext= 0;                              // remove extension
6325
6325
  TABLE_SHARE *share;
6326
6326
  bool result= 0, signalled= 0;
6327
6327
 
6328
 
  key_length=(uint) (stpcpy(stpcpy(key,db)+1,table_name)-key)+1;
 
6328
  key_length=(uint) (my_stpcpy(my_stpcpy(key,db)+1,table_name)-key)+1;
6329
6329
  for (;;)
6330
6330
  {
6331
6331
    HASH_SEARCH_STATE state;