From 0016d9a393a04c02715dfdeb73d2d10fa9860056 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 22 Nov 2000 04:24:54 +0200 Subject: Change storage of execution flags from thd->options to thd->lex.options --- sql/sql_delete.cc | 2 +- sql/sql_parse.cc | 5 +++-- sql/sql_select.cc | 6 +++--- sql/sql_update.cc | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) (limited to 'sql') diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 4875be9be6c..c01ea67424f 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -175,7 +175,7 @@ int mysql_delete(THD *thd,TABLE_LIST *table_list,COND *conds,ha_rows limit, /* If running in safe sql mode, don't allow updates without keys */ if (!table->quick_keys) { - thd->options|=OPTION_NO_INDEX_USED; + thd->lex.options|=OPTION_NO_INDEX_USED; if ((thd->options & OPTION_SAFE_UPDATES) && limit == HA_POS_ERROR) { delete select; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index b2e68e914eb..8e9584bc9d7 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -826,7 +826,8 @@ bool do_command(THD *thd) if (!thd->user_time) { if ((ulong) (thd->start_time - thd->time_after_lock) > long_query_time || - ((thd->options & (OPTION_NO_INDEX_USED | OPTION_NO_GOOD_INDEX_USED)) && + ((thd->lex.options & + (OPTION_NO_INDEX_USED | OPTION_NO_GOOD_INDEX_USED)) && (specialflag & SPECIAL_LONG_LOG_FORMAT))) { long_query_count++; @@ -855,7 +856,7 @@ mysql_execute_command(void) { int res=0; THD *thd=current_thd; - LEX *lex=current_lex; + LEX *lex= &thd->lex; TABLE_LIST *tables=(TABLE_LIST*) lex->table_list.first; DBUG_ENTER("mysql_execute_command"); diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 3aec452fe88..60f6a6299cf 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -2420,7 +2420,7 @@ make_join_readinfo(JOIN *join,uint options) /* These init changes read_record */ if (tab->use_quick == 2) { - join->thd->options|=OPTION_NO_GOOD_INDEX_USED; + join->thd->lex.options|=OPTION_NO_GOOD_INDEX_USED; tab->read_first_record= join_init_quick_read_record; statistic_increment(select_range_check_count, &LOCK_status); } @@ -2435,7 +2435,7 @@ make_join_readinfo(JOIN *join,uint options) } else { - join->thd->options|=OPTION_NO_INDEX_USED; + join->thd->lex.options|=OPTION_NO_INDEX_USED; statistic_increment(select_scan_count, &LOCK_status); } } @@ -2447,7 +2447,7 @@ make_join_readinfo(JOIN *join,uint options) } else { - join->thd->options|=OPTION_NO_INDEX_USED; + join->thd->lex.options|=OPTION_NO_INDEX_USED; statistic_increment(select_full_join_count, &LOCK_status); } } diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 41a1a9be7c2..709702142e1 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -102,7 +102,7 @@ int mysql_update(THD *thd,TABLE_LIST *table_list,List &fields, /* If running in safe sql mode, don't allow updates without keys */ if (!table->quick_keys) { - thd->options|=OPTION_NO_INDEX_USED; + thd->lex.options|=OPTION_NO_INDEX_USED; if ((thd->options & OPTION_SAFE_UPDATES) && limit == HA_POS_ERROR) { delete select; -- cgit v1.2.1