~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

  • Committer: Brian Aker
  • Date: 2009-05-14 21:17:19 UTC
  • mto: This revision was merged to the branch mainline in revision 1020.
  • Revision ID: brian@gaz-20090514211719-r7q4pe39t4pd8lyg
Merge (also removes session from show variables).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1275
1275
          error= ER_UNKNOWN_ERROR;
1276
1276
        if (str == NULL)
1277
1277
          str= ER(error);
1278
 
        session->main_da.set_error_status(session, error, str);
 
1278
        session->main_da.set_error_status(error, str);
1279
1279
      }
1280
1280
    }
1281
1281
 
2569
2569
  {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
2570
2570
};
2571
2571
 
2572
 
static int show_net_compression(Session *session,
2573
 
                                SHOW_VAR *var,
2574
 
                                char *)
2575
 
{
2576
 
  var->type= SHOW_MY_BOOL;
2577
 
  var->value= (char *)&session->compression;
2578
 
  return 0;
2579
 
}
2580
 
 
2581
 
static st_show_var_func_container
2582
 
show_net_compression_cont= { &show_net_compression };
2583
 
 
2584
 
static int show_starttime(Session *session, SHOW_VAR *var, char *buff)
 
2572
static int show_starttime(SHOW_VAR *var, char *buff)
2585
2573
{
2586
2574
  var->type= SHOW_LONG;
2587
2575
  var->value= buff;
2588
 
  *((long *)buff)= (long) (session->query_start() - server_start_time);
 
2576
  *((long *)buff)= (long) (time(NULL) - server_start_time);
2589
2577
  return 0;
2590
2578
}
2591
2579
 
2592
2580
static st_show_var_func_container
2593
2581
show_starttime_cont= { &show_starttime };
2594
2582
 
2595
 
static int show_flushstatustime(Session *session, SHOW_VAR *var, char *buff)
 
2583
static int show_flushstatustime(SHOW_VAR *var, char *buff)
2596
2584
{
2597
2585
  var->type= SHOW_LONG;
2598
2586
  var->value= buff;
2599
 
  *((long *)buff)= (long) (session->query_start() - flush_status_time);
 
2587
  *((long *)buff)= (long) (time(NULL) - flush_status_time);
2600
2588
  return 0;
2601
2589
}
2602
2590
 
2603
2591
static st_show_var_func_container
2604
2592
show_flushstatustime_cont= { &show_flushstatustime };
2605
2593
 
2606
 
static int show_open_tables(Session *, SHOW_VAR *var, char *buff)
 
2594
static int show_open_tables(SHOW_VAR *var, char *buff)
2607
2595
{
2608
2596
  var->type= SHOW_LONG;
2609
2597
  var->value= buff;
2611
2599
  return 0;
2612
2600
}
2613
2601
 
2614
 
static int show_table_definitions(Session *,
2615
 
                                  SHOW_VAR *var, char *buff)
 
2602
static int show_table_definitions(SHOW_VAR *var, char *buff)
2616
2603
{
2617
2604
  var->type= SHOW_LONG;
2618
2605
  var->value= buff;
2635
2622
  {"Bytes_received",           (char*) offsetof(STATUS_VAR, bytes_received), SHOW_LONGLONG_STATUS},
2636
2623
  {"Bytes_sent",               (char*) offsetof(STATUS_VAR, bytes_sent), SHOW_LONGLONG_STATUS},
2637
2624
  {"Com",                      (char*) com_status_vars, SHOW_ARRAY},
2638
 
  {"Compression",              (char*) &show_net_compression_cont, SHOW_FUNC},
2639
2625
  {"Connections",              (char*) &thread_id,          SHOW_INT_NOFLUSH},
2640
2626
  {"Created_tmp_disk_tables",  (char*) offsetof(STATUS_VAR, created_tmp_disk_tables), SHOW_LONG_STATUS},
2641
2627
  {"Created_tmp_files",        (char*) &my_tmp_file_created,SHOW_INT},