~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/log.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:
1146
1146
 
1147
1147
  if (!(dir_info = my_dir(buff,MYF(MY_DONT_SORT))))
1148
1148
  {                                             // This shouldn't happen
1149
 
    stpcpy(end,".1");                           // use name+1
 
1149
    my_stpcpy(end,".1");                                // use name+1
1150
1150
    return(0);
1151
1151
  }
1152
1152
  file_info= dir_info->dir_entry;
1214
1214
  }
1215
1215
 
1216
1216
  if (new_name)
1217
 
    stpcpy(log_file_name, new_name);
 
1217
    my_stpcpy(log_file_name, new_name);
1218
1218
  else if (generate_new_name(log_file_name, name))
1219
1219
    goto err;
1220
1220
 
1241
1241
                     my_progname, server_version, DRIZZLE_COMPILATION_COMMENT,
1242
1242
                     mysqld_port, ""
1243
1243
                     );
1244
 
    end= stpncpy(buff + len, "Time                 Id Command    Argument\n",
 
1244
    end= my_stpncpy(buff + len, "Time                 Id Command    Argument\n",
1245
1245
                 sizeof(buff) - len);
1246
1246
    if (my_b_write(&log_file, (uchar*) buff, (uint) (end-buff)) ||
1247
1247
        flush_io_cache(&log_file))
1587
1587
    {                                           // Database changed
1588
1588
      if (my_b_printf(&log_file,"use %s;\n",thd->db) == (uint) -1)
1589
1589
        tmp_errno= errno;
1590
 
      stpcpy(db,thd->db);
 
1590
      my_stpcpy(db,thd->db);
1591
1591
    }
1592
1592
    if (thd->stmt_depends_on_first_successful_insert_id_in_prev_stmt)
1593
1593
    {
1594
 
      end=stpcpy(end, ",last_insert_id=");
 
1594
      end=my_stpcpy(end, ",last_insert_id=");
1595
1595
      end=int64_t10_to_str((int64_t)
1596
1596
                            thd->first_successful_insert_id_in_prev_stmt_for_binlog,
1597
1597
                            end, -10);
1600
1600
    if (thd->auto_inc_intervals_in_cur_stmt_for_binlog.nb_elements() > 0)
1601
1601
    {
1602
1602
      {
1603
 
        end=stpcpy(end,",insert_id=");
 
1603
        end=my_stpcpy(end,",insert_id=");
1604
1604
        end=int64_t10_to_str((int64_t)
1605
1605
                              thd->auto_inc_intervals_in_cur_stmt_for_binlog.minimum(),
1606
1606
                              end, -10);
1612
1612
      checked the query start time or not. now we always write current
1613
1613
      timestamp to the slow log
1614
1614
    */
1615
 
    end= stpcpy(end, ",timestamp=");
 
1615
    end= my_stpcpy(end, ",timestamp=");
1616
1616
    end= int10_to_str((long) current_time, end, 10);
1617
1617
 
1618
1618
    if (end != buff)
2626
2626
  uint dir_len = dirname_length(log_file_name); 
2627
2627
  if (dir_len >= FN_REFLEN)
2628
2628
    dir_len=FN_REFLEN-1;
2629
 
  stpncpy(buf, log_file_name, dir_len);
 
2629
  my_stpncpy(buf, log_file_name, dir_len);
2630
2630
  strmake(buf+dir_len, log_ident, FN_REFLEN - dir_len -1);
2631
2631
}
2632
2632
 
3830
3830
  {
3831
3831
    char err_renamed[FN_REFLEN], *end;
3832
3832
    end= strmake(err_renamed,log_error_file,FN_REFLEN-4);
3833
 
    stpcpy(end, "-old");
 
3833
    my_stpcpy(end, "-old");
3834
3834
    VOID(pthread_mutex_lock(&LOCK_error_log));
3835
3835
    char err_temp[FN_REFLEN+4];
3836
3836
    /*