~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

  • Committer: Brian Aker
  • Date: 2008-10-06 06:47:29 UTC
  • Revision ID: brian@tangent.org-20081006064729-2i9mhjkzyvow9xsm
RemoveĀ uint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
222
222
static bool volatile select_thread_in_use, signal_thread_in_use;
223
223
static bool volatile ready_to_exit;
224
224
static bool opt_debugging= 0, opt_console= 0;
225
 
static uint kill_cached_threads, wake_thread;
 
225
static uint32_t kill_cached_threads, wake_thread;
226
226
static uint32_t killed_threads, thread_created;
227
227
static uint32_t max_used_connections;
228
228
static volatile uint32_t cached_thread_count= 0;
297
297
#ifdef HAVE_INITGROUPS
298
298
static bool calling_initgroups= false; /**< Used in SIGSEGV handler. */
299
299
#endif
300
 
uint mysqld_port, test_flags, select_errors, dropping_tables, ha_open_options;
301
 
uint mysqld_port_timeout;
302
 
uint delay_key_write_options, protocol_version;
303
 
uint lower_case_table_names= 1;
304
 
uint tc_heuristic_recover= 0;
305
 
uint volatile thread_count, thread_running;
 
300
uint32_t mysqld_port, test_flags, select_errors, dropping_tables, ha_open_options;
 
301
uint32_t mysqld_port_timeout;
 
302
uint32_t delay_key_write_options, protocol_version;
 
303
uint32_t lower_case_table_names= 1;
 
304
uint32_t tc_heuristic_recover= 0;
 
305
uint32_t volatile thread_count, thread_running;
306
306
uint64_t thd_startup_options;
307
307
ulong back_log, connect_timeout, server_id;
308
308
ulong table_cache_size, table_def_size;
329
329
ulong binlog_cache_disk_use= 0;
330
330
ulong max_connections;
331
331
ulong max_connect_errors;
332
 
uint  max_user_connections= 0;
 
332
uint32_t  max_user_connections= 0;
333
333
ulong thread_id=1L;
334
334
ulong current_pid;
335
335
ulong slow_launch_threads = 0;
381
381
     language[FN_REFLEN], reg_ext[FN_EXTLEN], mysql_charsets_dir[FN_REFLEN],
382
382
     *opt_init_file, *opt_tc_log_file;
383
383
char mysql_unpacked_real_data_home[FN_REFLEN];
384
 
uint reg_ext_length;
 
384
uint32_t reg_ext_length;
385
385
const key_map key_map_empty(0);
386
386
key_map key_map_full(0);                        // Will be initialized later
387
387
 
388
388
const char *opt_date_time_formats[3];
389
389
 
390
 
uint mysql_data_home_len;
 
390
uint32_t mysql_data_home_len;
391
391
char mysql_data_home_buff[2], *mysql_data_home=mysql_real_data_home;
392
392
char server_version[SERVER_VERSION_LENGTH];
393
393
char *opt_mysql_tmpdir;
451
451
pthread_cond_t  COND_server_started;
452
452
 
453
453
/* replication parameters, if master_host is not NULL, we are a slave */
454
 
uint report_port= DRIZZLE_PORT;
 
454
uint32_t report_port= DRIZZLE_PORT;
455
455
uint32_t master_retry_count= 0;
456
456
char *master_info_file;
457
457
char *relay_log_info_file, *report_user, *report_password, *report_host;
477
477
 
478
478
struct passwd *user_info;
479
479
static pthread_t select_thread;
480
 
static uint thr_kill_signal;
 
480
static uint32_t thr_kill_signal;
481
481
 
482
482
/* OS specific variables */
483
483
 
489
489
  Number of currently active user connections. The variable is protected by
490
490
  LOCK_connection_count.
491
491
*/
492
 
uint connection_count= 0;
 
492
uint32_t connection_count= 0;
493
493
 
494
494
/* Function declarations */
495
495
 
544
544
      break;                                    // allready dead
545
545
#endif
546
546
    set_timespec(abstime, 2);
547
 
    for (uint tmp=0 ; tmp < 10 && select_thread_in_use; tmp++)
 
547
    for (uint32_t tmp=0 ; tmp < 10 && select_thread_in_use; tmp++)
548
548
    {
549
549
      error=pthread_cond_timedwait(&COND_thread_count,&LOCK_thread_count,
550
550
                                   &abstime);
892
892
*/
893
893
static void wait_for_signal_thread_to_end()
894
894
{
895
 
  uint i;
 
895
  uint32_t i;
896
896
  /*
897
897
    Wait up to 10 seconds for signal thread to die. We use this mainly to
898
898
    avoid getting warnings that my_thread_end has not been called
1089
1089
static void network_init(void)
1090
1090
{
1091
1091
  int   ret;
1092
 
  uint  waited;
1093
 
  uint  this_wait;
1094
 
  uint  retry;
 
1092
  uint32_t  waited;
 
1093
  uint32_t  this_wait;
 
1094
  uint32_t  retry;
1095
1095
  char port_buf[NI_MAXSERV];
1096
1096
  struct addrinfo *ai;
1097
1097
  struct addrinfo *next;
1223
1223
  @note
1224
1224
    For the connection that is doing shutdown, this is called twice
1225
1225
*/
1226
 
void close_connection(THD *thd, uint errcode, bool lock)
 
1226
void close_connection(THD *thd, uint32_t errcode, bool lock)
1227
1227
{
1228
1228
  st_vio *vio;
1229
1229
  if (lock)
1814
1814
  for the client.
1815
1815
*/
1816
1816
/* ARGSUSED */
1817
 
extern "C" void my_message_sql(uint error, const char *str, myf MyFlags);
 
1817
extern "C" void my_message_sql(uint32_t error, const char *str, myf MyFlags);
1818
1818
 
1819
 
void my_message_sql(uint error, const char *str, myf MyFlags)
 
1819
void my_message_sql(uint32_t error, const char *str, myf MyFlags)
1820
1820
{
1821
1821
  THD *thd;
1822
1822
  /*
2079
2079
 
2080
2080
  /* connections and databases needs lots of files */
2081
2081
  {
2082
 
    uint files, wanted_files, max_open_files;
 
2082
    uint32_t files, wanted_files, max_open_files;
2083
2083
 
2084
2084
    /* MyISAM requires two file handles per table. */
2085
2085
    wanted_files= 10+max_connections+table_cache_size*2;
2790
2790
{
2791
2791
  int x;
2792
2792
  int sock,new_sock;
2793
 
  uint error_count=0;
 
2793
  uint32_t error_count=0;
2794
2794
  THD *thd;
2795
2795
  struct sockaddr_storage cAddr;
2796
2796
 
2833
2833
    }
2834
2834
    assert(sock != -1);
2835
2835
 
2836
 
    for (uint retry=0; retry < MAX_ACCEPT_RETRY; retry++)
 
2836
    for (uint32_t retry=0; retry < MAX_ACCEPT_RETRY; retry++)
2837
2837
    {
2838
2838
      SOCKET_SIZE_TYPE length= sizeof(struct sockaddr_storage);
2839
2839
      new_sock= accept(sock, (struct sockaddr *)(&cAddr),
4638
4638
 
4639
4639
/** Handle arguments for multiple key caches. */
4640
4640
 
4641
 
extern "C" char **mysql_getopt_value(const char *keyname, uint key_length,
 
4641
extern "C" char **mysql_getopt_value(const char *keyname, uint32_t key_length,
4642
4642
                                      const struct my_option *option);
4643
4643
 
4644
4644
char**
4645
 
mysql_getopt_value(const char *keyname, uint key_length,
 
4645
mysql_getopt_value(const char *keyname, uint32_t key_length,
4646
4646
                   const struct my_option *option)
4647
4647
{
4648
4648
  switch (option->id) {