~mysql/mysql-server/mysql-6.0

« back to all changes in this revision

Viewing changes to sql/repl_failsafe.cc

  • Committer: monty at mysql
  • Date: 2002-07-23 15:31:22 UTC
  • mto: (1110.1.7)
  • mto: This revision was merged to the branch mainline in revision 1116.
  • Revision ID: sp1r-monty@mashka.mysql.fi-20020723153122-09736
New SET syntax & system variables.
Made a some new buffers thread specific and changeable.
Resize of key_buffer.
AUTO_COMMIT -> AUTOCOMMIT
Fixed mutex bug in DROP DATABASE
Fixed bug when using auto_increment as second part of a key where first part could include NULL.
Split handler->extra() to extra() and extra_opt() to be able to support thread specific buffers.
Don't write message to error log when slave reconnects becasue of timeout.
Fixed possible update problem when using DELETE/UPDATE on small tables
(In some cases we used index even if table scanning would be better)
A lot of minior code cleanups

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
  thd->system_thread = thd->bootstrap = 1;
60
60
  thd->client_capabilities = 0;
61
61
  my_net_init(&thd->net, 0);
62
 
  thd->net.timeout = slave_net_timeout;
63
 
  thd->max_packet_length=thd->net.max_packet;
 
62
  thd->net.read_timeout = slave_net_timeout;
 
63
  thd->max_client_packet_length=thd->net.max_packet;
64
64
  thd->master_access= ~0;
65
65
  thd->priv_user = 0;
66
66
  thd->system_thread = 1;
68
68
  thd->thread_id = thread_id++;
69
69
  pthread_mutex_unlock(&LOCK_thread_count);
70
70
 
71
 
  if (init_thr_lock() ||
72
 
      my_pthread_setspecific_ptr(THR_THD,  thd) ||
73
 
      my_pthread_setspecific_ptr(THR_MALLOC, &thd->mem_root) ||
74
 
      my_pthread_setspecific_ptr(THR_NET,  &thd->net))
 
71
  if (init_thr_lock() || thd->store_globals())
75
72
  {
76
73
    close_connection(&thd->net,ER_OUT_OF_RESOURCES); // is this needed?
77
74
    end_thread(thd,0);
87
84
#endif
88
85
 
89
86
  thd->mem_root.free=thd->mem_root.used=0;      
90
 
  if (thd->max_join_size == (ulong) ~0L)
91
 
    thd->options |= OPTION_BIG_SELECTS;
 
87
  if ((ulong) thd->variables.max_join_size == (ulong) HA_POS_ERROR)
 
88
    thd->options|= OPTION_BIG_SELECTS;
92
89
 
93
90
  thd->proc_info="Thread initialized";
94
91
  thd->version=refresh_version;
626
623
    return 1;
627
624
 
628
625
  if (!mc_mysql_connect(mysql, mi->host, mi->user, mi->password, 0,
629
 
                   mi->port, 0, 0))
 
626
                        mi->port, 0, 0,
 
627
                        slave_net_timeout))
630
628
  {
631
629
    sql_print_error("Connection to master failed: %s",
632
630
                    mc_mysql_error(mysql));