~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.cc

  • Committer: Brian Aker
  • Date: 2009-05-29 22:44:39 UTC
  • mfrom: (1039.1.14 merge)
  • Revision ID: brian@gaz-20090529224439-0vdgsd8b8c002yi1
Merge Brian

Show diffs side-by-side

added added

removed removed

Lines of Context:
241
241
  where= Session::DEFAULT_WHERE;
242
242
  command=COM_CONNECT;
243
243
 
244
 
  init();
 
244
  plugin_sessionvar_init(this);
 
245
  /*
 
246
    variables= global_system_variables above has reset
 
247
    variables.pseudo_thread_id to 0. We need to correct it here to
 
248
    avoid temporary tables replication failure.
 
249
  */
 
250
  variables.pseudo_thread_id= thread_id;
 
251
  server_status= SERVER_STATUS_AUTOCOMMIT;
 
252
  options= session_startup_options;
 
253
 
 
254
  if (variables.max_join_size == HA_POS_ERROR)
 
255
    options |= OPTION_BIG_SELECTS;
 
256
  else
 
257
    options &= ~OPTION_BIG_SELECTS;
 
258
 
 
259
  transaction.all.modified_non_trans_table= transaction.stmt.modified_non_trans_table= false;
 
260
  open_options=ha_open_options;
 
261
  update_lock_default= TL_WRITE;
 
262
  session_tx_isolation= (enum_tx_isolation) variables.tx_isolation;
 
263
  warn_list.empty();
 
264
  memset(warn_count, 0, sizeof(warn_count));
 
265
  total_warn_count= 0;
 
266
  update_charset();
 
267
  memset(&status_var, 0, sizeof(status_var));
 
268
 
 
269
 
 
270
 
245
271
  /* Initialize sub structures */
246
272
  init_sql_alloc(&warn_root, WARN_ALLOC_BLOCK_SIZE, WARN_ALLOC_PREALLOC_SIZE);
247
273
  hash_init(&user_vars, system_charset_info, USER_VARS_HASH_SIZE, 0, 0,
333
359
#endif
334
360
 
335
361
/*
336
 
  Init common variables that has to be reset on start and on change_user
337
 
*/
338
 
 
339
 
void Session::init(void)
340
 
{
341
 
  plugin_sessionvar_init(this);
342
 
  /*
343
 
    variables= global_system_variables above has reset
344
 
    variables.pseudo_thread_id to 0. We need to correct it here to
345
 
    avoid temporary tables replication failure.
346
 
  */
347
 
  variables.pseudo_thread_id= thread_id;
348
 
  server_status= SERVER_STATUS_AUTOCOMMIT;
349
 
  options= session_startup_options;
350
 
 
351
 
  if (variables.max_join_size == HA_POS_ERROR)
352
 
    options |= OPTION_BIG_SELECTS;
353
 
  else
354
 
    options &= ~OPTION_BIG_SELECTS;
355
 
 
356
 
  transaction.all.modified_non_trans_table= transaction.stmt.modified_non_trans_table= false;
357
 
  open_options=ha_open_options;
358
 
  update_lock_default= TL_WRITE;
359
 
  session_tx_isolation= (enum_tx_isolation) variables.tx_isolation;
360
 
  warn_list.empty();
361
 
  memset(warn_count, 0, sizeof(warn_count));
362
 
  total_warn_count= 0;
363
 
  update_charset();
364
 
  memset(&status_var, 0, sizeof(status_var));
365
 
}
366
 
 
367
 
 
368
 
/*
369
362
  Init Session for query processing.
370
363
  This has to be called once before we call mysql_parse.
371
364
  See also comments in session.h.