summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-11-22 04:24:54 +0200
committerunknown <monty@donna.mysql.com>2000-11-22 04:24:54 +0200
commit0016d9a393a04c02715dfdeb73d2d10fa9860056 (patch)
tree5cdcd57f1abf34e5c23602c7dc9c921516f17bd1 /sql
parentb7aecfe7d23a2fdb2609f7cbad5943552b6cf143 (diff)
downloadmariadb-git-0016d9a393a04c02715dfdeb73d2d10fa9860056.tar.gz
Change storage of execution flags from thd->options to thd->lex.options
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_delete.cc2
-rw-r--r--sql/sql_parse.cc5
-rw-r--r--sql/sql_select.cc6
-rw-r--r--sql/sql_update.cc2
4 files changed, 8 insertions, 7 deletions
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<Item> &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;