~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/log.cc

mergingĀ fromĀ main

Show diffs side-by-side

added added

removed removed

Lines of Context:
1145
1145
 
1146
1146
  if (!(dir_info = my_dir(buff,MYF(MY_DONT_SORT))))
1147
1147
  {                                             // This shouldn't happen
1148
 
    strmov(end,".1");                           // use name+1
 
1148
    stpcpy(end,".1");                           // use name+1
1149
1149
    return(0);
1150
1150
  }
1151
1151
  file_info= dir_info->dir_entry;
1213
1213
  }
1214
1214
 
1215
1215
  if (new_name)
1216
 
    strmov(log_file_name, new_name);
 
1216
    stpcpy(log_file_name, new_name);
1217
1217
  else if (generate_new_name(log_file_name, name))
1218
1218
    goto err;
1219
1219
 
1240
1240
                     my_progname, server_version, MYSQL_COMPILATION_COMMENT,
1241
1241
                     mysqld_port, ""
1242
1242
                     );
1243
 
    end= strnmov(buff + len, "Time                 Id Command    Argument\n",
 
1243
    end= stpncpy(buff + len, "Time                 Id Command    Argument\n",
1244
1244
                 sizeof(buff) - len);
1245
1245
    if (my_b_write(&log_file, (uchar*) buff, (uint) (end-buff)) ||
1246
1246
        flush_io_cache(&log_file))
1585
1585
    {                                           // Database changed
1586
1586
      if (my_b_printf(&log_file,"use %s;\n",thd->db) == (uint) -1)
1587
1587
        tmp_errno= errno;
1588
 
      strmov(db,thd->db);
 
1588
      stpcpy(db,thd->db);
1589
1589
    }
1590
1590
    if (thd->stmt_depends_on_first_successful_insert_id_in_prev_stmt)
1591
1591
    {
1592
 
      end=strmov(end, ",last_insert_id=");
 
1592
      end=stpcpy(end, ",last_insert_id=");
1593
1593
      end=int64_t10_to_str((int64_t)
1594
1594
                            thd->first_successful_insert_id_in_prev_stmt_for_binlog,
1595
1595
                            end, -10);
1599
1599
    {
1600
1600
      if (!(specialflag & SPECIAL_SHORT_LOG_FORMAT))
1601
1601
      {
1602
 
        end=strmov(end,",insert_id=");
 
1602
        end=stpcpy(end,",insert_id=");
1603
1603
        end=int64_t10_to_str((int64_t)
1604
1604
                              thd->auto_inc_intervals_in_cur_stmt_for_binlog.minimum(),
1605
1605
                              end, -10);
1611
1611
      checked the query start time or not. now we always write current
1612
1612
      timestamp to the slow log
1613
1613
    */
1614
 
    end= strmov(end, ",timestamp=");
 
1614
    end= stpcpy(end, ",timestamp=");
1615
1615
    end= int10_to_str((long) current_time, end, 10);
1616
1616
 
1617
1617
    if (end != buff)
2623
2623
  uint dir_len = dirname_length(log_file_name); 
2624
2624
  if (dir_len >= FN_REFLEN)
2625
2625
    dir_len=FN_REFLEN-1;
2626
 
  strnmov(buf, log_file_name, dir_len);
 
2626
  stpncpy(buf, log_file_name, dir_len);
2627
2627
  strmake(buf+dir_len, log_ident, FN_REFLEN - dir_len -1);
2628
2628
}
2629
2629
 
3827
3827
  {
3828
3828
    char err_renamed[FN_REFLEN], *end;
3829
3829
    end= strmake(err_renamed,log_error_file,FN_REFLEN-4);
3830
 
    strmov(end, "-old");
 
3830
    stpcpy(end, "-old");
3831
3831
    VOID(pthread_mutex_lock(&LOCK_error_log));
3832
3832
    char err_temp[FN_REFLEN+4];
3833
3833
    /*