summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorunknown <vva@eagle.mysql.r18.ru>2003-05-05 14:54:37 -0400
committerunknown <vva@eagle.mysql.r18.ru>2003-05-05 14:54:37 -0400
commitb9121cdea38b75aabc5a29a769ee409c962f42e0 (patch)
tree5da77cfccce06cd1eaa12c4306dc0be2bbac9d15 /sql/sql_delete.cc
parent0e891786615356dbc9bca3c5132e259e92b89ad9 (diff)
downloadmariadb-git-b9121cdea38b75aabc5a29a769ee409c962f42e0.tar.gz
made lex a pointer in THD
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 08f1727c515..8de40e416c2 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -38,18 +38,18 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order,
bool transactional_table, log_delayed, safe_update, const_cond;
ha_rows deleted;
TABLE_LIST *delete_table_list= (TABLE_LIST*)
- thd->lex.select_lex.table_list.first;
+ thd->lex->select_lex.table_list.first;
DBUG_ENTER("mysql_delete");
if ((open_and_lock_tables(thd, table_list)))
DBUG_RETURN(-1);
- fix_tables_pointers(thd->lex.all_selects_list);
+ fix_tables_pointers(thd->lex->all_selects_list);
table= table_list->table;
table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);
thd->proc_info="init";
table->map=1;
if (setup_conds(thd, delete_table_list, &conds) ||
- setup_ftfuncs(&thd->lex.select_lex))
+ setup_ftfuncs(&thd->lex->select_lex))
DBUG_RETURN(-1);
if (find_real_table_in_list(table_list->next,
table_list->db, table_list->real_name))
@@ -92,7 +92,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order,
if ((select && select->check_quick(safe_update, limit)) || !limit)
{
delete select;
- free_underlaid_joins(thd, &thd->lex.select_lex);
+ free_underlaid_joins(thd, &thd->lex->select_lex);
send_ok(thd,0L);
DBUG_RETURN(0); // Nothing to delete
}
@@ -100,11 +100,11 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order,
/* If running in safe sql mode, don't allow updates without keys */
if (!table->quick_keys)
{
- thd->lex.select_lex.options|=QUERY_NO_INDEX_USED;
+ thd->lex->select_lex.options|=QUERY_NO_INDEX_USED;
if (safe_update && !using_limit)
{
delete select;
- free_underlaid_joins(thd, &thd->lex.select_lex);
+ free_underlaid_joins(thd, &thd->lex->select_lex);
send_error(thd,ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE);
DBUG_RETURN(1);
}
@@ -126,9 +126,9 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order,
table->sort.io_cache = (IO_CACHE *) my_malloc(sizeof(IO_CACHE),
MYF(MY_FAE | MY_ZEROFILL));
- if (setup_ref_array(thd, &thd->lex.select_lex.ref_pointer_array,
+ if (setup_ref_array(thd, &thd->lex->select_lex.ref_pointer_array,
all_fields.elements)||
- setup_order(thd, thd->lex.select_lex.ref_pointer_array, &tables,
+ setup_order(thd, thd->lex->select_lex.ref_pointer_array, &tables,
fields, all_fields, order) ||
!(sortorder=make_unireg_sortorder(order, &length)) ||
(table->sort.found_records = filesort(thd, table, sortorder, length,
@@ -137,14 +137,14 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order,
== HA_POS_ERROR)
{
delete select;
- free_underlaid_joins(thd, &thd->lex.select_lex);
+ free_underlaid_joins(thd, &thd->lex->select_lex);
DBUG_RETURN(-1); // This will force out message
}
}
init_read_record(&info,thd,table,select,1,1);
deleted=0L;
- init_ftfuncs(thd, &thd->lex.select_lex, 1);
+ init_ftfuncs(thd, &thd->lex->select_lex, 1);
thd->proc_info="updating";
while (!(error=info.read_record(&info)) && !thd->killed &&
!thd->net.report_error)
@@ -212,7 +212,7 @@ cleanup:
thd->lock=0;
}
delete select;
- free_underlaid_joins(thd, &thd->lex.select_lex);
+ free_underlaid_joins(thd, &thd->lex->select_lex);
if (error >= 0 || thd->net.report_error)
send_error(thd,thd->killed_errno());
else
@@ -302,7 +302,7 @@ multi_delete::initialize_tables(JOIN *join)
table->file->ref_length,
MEM_STRIP_BUF_SIZE);
}
- init_ftfuncs(thd, thd->lex.current_select->select_lex(), 1);
+ init_ftfuncs(thd, thd->lex->current_select->select_lex(), 1);
DBUG_RETURN(thd->is_fatal_error != 0);
}