From 1b9ce04050df537888d50a53eeccbe39079e45bb Mon Sep 17 00:00:00 2001 From: "jcole@tetra.spaceapes.com" <> Date: Wed, 14 Mar 2001 01:18:16 -0600 Subject: Moved state_map copying to THD::THD(). --- sql/sql_class.cc | 4 ++++ sql/sql_lex.cc | 2 +- sql/sql_parse.cc | 4 ---- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 1bced49be57..24a48604da2 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -133,6 +133,10 @@ THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0), } #endif + // copy global state map into thread + for(int x=0; x < 256; x++) + state_map[x] = global_state_map[x]; + #ifdef __WIN__ real_id = 0 ; #endif diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 5e75339b0db..f0357b99d70 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -425,7 +425,7 @@ int yylex(void *arg) uint length; enum lex_states state,prev_state; LEX *lex=current_lex; - uchar *state_map = global_state_map; // thd->lex->state_map; + uchar *state_map = lex->thd->state_map; YYSTYPE *yylval=(YYSTYPE*) arg; lex->yylval=yylval; // The global state diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 6ddb3b45864..1884a8825ba 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -512,10 +512,6 @@ pthread_handler_decl(handle_one_connection,arg) return 0; } - // copy global state map into thread - for(int x=0; x < 256; x++) - thd->state_map[x] = global_state_map[x]; - do { int error; -- cgit v1.2.1