~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to server/log.cc

  • Committer: Brian Aker
  • Date: 2008-07-13 22:21:51 UTC
  • Revision ID: brian@tangent.org-20080713222151-fv2tcpbsc829j2oc
Ulonglong to uint64_t

Show diffs side-by-side

added added

removed removed

Lines of Context:
233
233
bool Log_to_file_event_handler::
234
234
  log_slow(THD *thd, time_t current_time, time_t query_start_arg,
235
235
           const char *user_host, uint user_host_len,
236
 
           ulonglong query_utime, ulonglong lock_utime, bool is_command,
 
236
           uint64_t query_utime, uint64_t lock_utime, bool is_command,
237
237
           const char *sql_text, uint sql_text_len)
238
238
{
239
239
  return mysql_slow_log.write(thd, current_time, query_start_arg,
402
402
*/
403
403
 
404
404
bool LOGGER::slow_log_print(THD *thd, const char *query, uint query_length,
405
 
                            ulonglong current_utime)
 
405
                            uint64_t current_utime)
406
406
 
407
407
{
408
408
  bool error= false;
411
411
  char user_host_buff[MAX_USER_HOST_SIZE];
412
412
  Security_context *sctx= thd->security_ctx;
413
413
  uint user_host_len= 0;
414
 
  ulonglong query_utime, lock_utime;
 
414
  uint64_t query_utime, lock_utime;
415
415
 
416
416
  /*
417
417
    Print the message to the buffer if we have slow log enabled
945
945
 
946
946
    Otherwise, we accumulate the statement
947
947
  */
948
 
  ulonglong const in_transaction=
 
948
  uint64_t const in_transaction=
949
949
    thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN);
950
950
  if ((in_transaction && (all || (!trx_data->at_least_one_stmt && thd->transaction.stmt.modified_non_trans_table))) || (!in_transaction && !all))
951
951
  {
1532
1532
bool MYSQL_QUERY_LOG::write(THD *thd, time_t current_time,
1533
1533
                            time_t query_start_arg __attribute__((__unused__)),
1534
1534
                            const char *user_host,
1535
 
                            uint user_host_len, ulonglong query_utime,
1536
 
                            ulonglong lock_utime, bool is_command,
 
1535
                            uint user_host_len, uint64_t query_utime,
 
1536
                            uint64_t lock_utime, bool is_command,
1537
1537
                            const char *sql_text, uint sql_text_len)
1538
1538
{
1539
1539
  bool error= 0;
1581
1581
        tmp_errno= errno;
1582
1582
    }
1583
1583
    /* For slow query log */
1584
 
    sprintf(query_time_buff, "%.6f", ulonglong2double(query_utime)/1000000.0);
1585
 
    sprintf(lock_time_buff,  "%.6f", ulonglong2double(lock_utime)/1000000.0);
 
1584
    sprintf(query_time_buff, "%.6f", uint64_t2double(query_utime)/1000000.0);
 
1585
    sprintf(lock_time_buff,  "%.6f", uint64_t2double(lock_utime)/1000000.0);
1586
1586
    if (my_b_printf(&log_file,
1587
1587
                    "# Query_time: %s  Lock_time: %s"
1588
1588
                    " Rows_sent: %lu  Rows_examined: %lu\n",
2391
2391
                          bool included,
2392
2392
                          bool need_mutex, 
2393
2393
                          bool need_update_threads, 
2394
 
                          ulonglong *decrease_log_space)
 
2394
                          uint64_t *decrease_log_space)
2395
2395
{
2396
2396
  int error;
2397
2397
  int ret = 0;
3297
3297
 
3298
3298
 
3299
3299
bool slow_log_print(THD *thd, const char *query, uint query_length,
3300
 
                    ulonglong current_utime)
 
3300
                    uint64_t current_utime)
3301
3301
{
3302
3302
  return logger.slow_log_print(thd, query, query_length, current_utime);
3303
3303
}
4672
4672
  @return byte offset from the beginning of the binlog
4673
4673
*/
4674
4674
extern "C"
4675
 
ulonglong mysql_bin_log_file_pos(void)
 
4675
uint64_t mysql_bin_log_file_pos(void)
4676
4676
{
4677
 
  return (ulonglong) mysql_bin_log.get_log_file()->pos_in_file;
 
4677
  return (uint64_t) mysql_bin_log.get_log_file()->pos_in_file;
4678
4678
}
4679
4679
#endif /* INNODB_COMPATIBILITY_HOOKS */
4680
4680