summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorunknown <konstantin@oak.local>2003-12-19 20:52:13 +0300
committerunknown <konstantin@oak.local>2003-12-19 20:52:13 +0300
commit8d987f9e532689545becf521aa6a6aa6b23bf330 (patch)
treea4c72a1d62170f1e5637ed34fd09ada369f1c764 /sql/sql_parse.cc
parentbfe77e3398944bed4c919ba0c7477a4318d9f2cc (diff)
downloadmariadb-git-8d987f9e532689545becf521aa6a6aa6b23bf330.tar.gz
THD::lex now points to THD::main_lex like in 5.0
All tests pass (client_test included) libmysqld/lib_sql.cc: THD::lex now points to THD::main_lex like in 5.0 sql/filesort.cc: THD::lex now points to THD::main_lex like in 5.0 sql/ha_innodb.cc: THD::lex now points to THD::main_lex like in 5.0 sql/ha_myisam.cc: THD::lex now points to THD::main_lex like in 5.0 sql/item.cc: THD::lex now points to THD::main_lex like in 5.0 sql/item_cmpfunc.cc: THD::lex now points to THD::main_lex like in 5.0 sql/item_create.cc: THD::lex now points to THD::main_lex like in 5.0 sql/item_func.cc: THD::lex now points to THD::main_lex like in 5.0 sql/item_subselect.cc: THD::lex now points to THD::main_lex like in 5.0 sql/item_sum.cc: THD::lex now points to THD::main_lex like in 5.0 sql/mysql_priv.h: THD::lex now points to THD::main_lex like in 5.0 sql/mysqld.cc: THD::lex now points to THD::main_lex like in 5.0 sql/protocol.cc: THD::lex now points to THD::main_lex like in 5.0 sql/repl_failsafe.cc: THD::lex now points to THD::main_lex like in 5.0 sql/slave.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_acl.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_base.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_cache.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_class.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_class.h: THD::lex now points to THD::main_lex like in 5.0 sql/sql_delete.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_error.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_insert.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_lex.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_lex.h: THD::lex now points to THD::main_lex like in 5.0 sql/sql_parse.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_prepare.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_repl.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_select.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_table.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_union.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_update.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_yacc.yy: THD::lex now points to THD::main_lex like in 5.0
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 50f2a03b448..3f2325de703 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1176,7 +1176,7 @@ bool do_command(THD *thd)
indicator of uninitialized lex => normal flow of errors handling
(see my_message_sql)
*/
- thd->lex.current_select= 0;
+ thd->lex->current_select= 0;
packet=0;
old_timeout=net->read_timeout;
@@ -1383,16 +1383,16 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
DBUG_PRINT("query",("%-.4096s",thd->query));
mysql_parse(thd,thd->query, thd->query_length);
- while (!thd->killed && !thd->is_fatal_error && thd->lex.found_colon)
+ while (!thd->killed && !thd->is_fatal_error && thd->lex->found_colon)
{
- char *packet= thd->lex.found_colon;
+ char *packet= thd->lex->found_colon;
/*
Multiple queries exits, execute them individually
*/
if (thd->lock || thd->open_tables || thd->derived_tables)
close_thread_tables(thd);
- ulong length= thd->query_length-(ulong)(thd->lex.found_colon-thd->query);
+ ulong length= thd->query_length-(ulong)(thd->lex->found_colon-thd->query);
/* Remove garbage at start of query */
while (my_isspace(thd->charset(), *packet) && length > 0)
@@ -1736,7 +1736,7 @@ void
mysql_execute_command(THD *thd)
{
int res= 0;
- LEX *lex= &thd->lex;
+ LEX *lex= thd->lex;
TABLE_LIST *tables= (TABLE_LIST*) lex->select_lex.table_list.first;
SELECT_LEX *select_lex= &lex->select_lex;
SELECT_LEX_UNIT *unit= &lex->unit;
@@ -1865,7 +1865,7 @@ mysql_execute_command(THD *thd)
else
thd->send_explain_fields(result);
fix_tables_pointers(lex->all_selects_list);
- res= mysql_explain_union(thd, &thd->lex.unit, result);
+ res= mysql_explain_union(thd, &thd->lex->unit, result);
MYSQL_LOCK *save_lock= thd->lock;
thd->lock= (MYSQL_LOCK *)0;
if (lex->describe & DESCRIBE_EXTENDED)
@@ -1873,7 +1873,7 @@ mysql_execute_command(THD *thd)
char buff[1024];
String str(buff,(uint32) sizeof(buff), system_charset_info);
str.length(0);
- thd->lex.unit.print(&str);
+ thd->lex->unit.print(&str);
str.append('\0');
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
ER_YES, str.ptr());
@@ -2634,7 +2634,7 @@ mysql_execute_command(THD *thd)
}
case SQLCOM_DELETE_MULTI:
{
- TABLE_LIST *aux_tables=(TABLE_LIST *)thd->lex.auxilliary_table_list.first;
+ TABLE_LIST *aux_tables= (TABLE_LIST *)thd->lex->auxilliary_table_list.first;
TABLE_LIST *auxi;
uint table_count=0;
multi_delete *result;
@@ -3693,7 +3693,7 @@ void
mysql_init_query(THD *thd)
{
DBUG_ENTER("mysql_init_query");
- LEX *lex=&thd->lex;
+ LEX *lex= thd->lex;
lex->unit.init_query();
lex->unit.init_select();
lex->unit.thd= thd;
@@ -3821,7 +3821,7 @@ void create_select_for_variable(const char *var_name)
DBUG_ENTER("create_select_for_variable");
thd= current_thd;
- lex= &thd->lex;
+ lex= thd->lex;
mysql_init_select(lex);
lex->sql_command= SQLCOM_SELECT;
tmp.str= (char*) var_name;
@@ -3899,7 +3899,7 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type,
uint uint_geom_type)
{
register create_field *new_field;
- LEX *lex= &thd->lex;
+ LEX *lex= thd->lex;
uint allowed_type_modifier=0;
char warn_buff[MYSQL_ERRMSG_SIZE];
DBUG_ENTER("add_field_to_list");
@@ -4233,7 +4233,7 @@ add_proc_to_list(THD* thd, Item *item)
*item_ptr= item;
order->item=item_ptr;
order->free_me=0;
- thd->lex.proc_list.link_in_list((byte*) order,(byte**) &order->next);
+ thd->lex->proc_list.link_in_list((byte*) order,(byte**) &order->next);
return 0;
}
@@ -4715,11 +4715,11 @@ static bool append_file_to_dir(THD *thd, char **filename_ptr, char *table_name)
bool check_simple_select()
{
THD *thd= current_thd;
- if (thd->lex.current_select != &thd->lex.select_lex)
+ if (thd->lex->current_select != &thd->lex->select_lex)
{
char command[80];
- strmake(command, thd->lex.yylval->symbol.str,
- min(thd->lex.yylval->symbol.length, sizeof(command)-1));
+ strmake(command, thd->lex->yylval->symbol.str,
+ min(thd->lex->yylval->symbol.length, sizeof(command)-1));
net_printf(thd, ER_CANT_USE_OPTION_HERE, command);
return 1;
}