Change storage of execution flags from thd->options to thd->lex.options
This commit is contained in:
parent
b7aecfe7d2
commit
0016d9a393
@ -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 running in safe sql mode, don't allow updates without keys */
|
||||||
if (!table->quick_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)
|
if ((thd->options & OPTION_SAFE_UPDATES) && limit == HA_POS_ERROR)
|
||||||
{
|
{
|
||||||
delete select;
|
delete select;
|
||||||
|
@ -826,7 +826,8 @@ bool do_command(THD *thd)
|
|||||||
if (!thd->user_time)
|
if (!thd->user_time)
|
||||||
{
|
{
|
||||||
if ((ulong) (thd->start_time - thd->time_after_lock) > long_query_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)))
|
(specialflag & SPECIAL_LONG_LOG_FORMAT)))
|
||||||
{
|
{
|
||||||
long_query_count++;
|
long_query_count++;
|
||||||
@ -855,7 +856,7 @@ mysql_execute_command(void)
|
|||||||
{
|
{
|
||||||
int res=0;
|
int res=0;
|
||||||
THD *thd=current_thd;
|
THD *thd=current_thd;
|
||||||
LEX *lex=current_lex;
|
LEX *lex= &thd->lex;
|
||||||
TABLE_LIST *tables=(TABLE_LIST*) lex->table_list.first;
|
TABLE_LIST *tables=(TABLE_LIST*) lex->table_list.first;
|
||||||
DBUG_ENTER("mysql_execute_command");
|
DBUG_ENTER("mysql_execute_command");
|
||||||
|
|
||||||
|
@ -2420,7 +2420,7 @@ make_join_readinfo(JOIN *join,uint options)
|
|||||||
/* These init changes read_record */
|
/* These init changes read_record */
|
||||||
if (tab->use_quick == 2)
|
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;
|
tab->read_first_record= join_init_quick_read_record;
|
||||||
statistic_increment(select_range_check_count, &LOCK_status);
|
statistic_increment(select_range_check_count, &LOCK_status);
|
||||||
}
|
}
|
||||||
@ -2435,7 +2435,7 @@ make_join_readinfo(JOIN *join,uint options)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
join->thd->options|=OPTION_NO_INDEX_USED;
|
join->thd->lex.options|=OPTION_NO_INDEX_USED;
|
||||||
statistic_increment(select_scan_count, &LOCK_status);
|
statistic_increment(select_scan_count, &LOCK_status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2447,7 +2447,7 @@ make_join_readinfo(JOIN *join,uint options)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
join->thd->options|=OPTION_NO_INDEX_USED;
|
join->thd->lex.options|=OPTION_NO_INDEX_USED;
|
||||||
statistic_increment(select_full_join_count, &LOCK_status);
|
statistic_increment(select_full_join_count, &LOCK_status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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 running in safe sql mode, don't allow updates without keys */
|
||||||
if (!table->quick_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)
|
if ((thd->options & OPTION_SAFE_UPDATES) && limit == HA_POS_ERROR)
|
||||||
{
|
{
|
||||||
delete select;
|
delete select;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user