diff options
author | unknown <konstantin@oak.local> | 2003-12-19 20:52:13 +0300 |
---|---|---|
committer | unknown <konstantin@oak.local> | 2003-12-19 20:52:13 +0300 |
commit | 8d987f9e532689545becf521aa6a6aa6b23bf330 (patch) | |
tree | a4c72a1d62170f1e5637ed34fd09ada369f1c764 /sql/sql_prepare.cc | |
parent | bfe77e3398944bed4c919ba0c7477a4318d9f2cc (diff) | |
download | mariadb-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_prepare.cc')
-rw-r--r-- | sql/sql_prepare.cc | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 58e6dbff1ed..bb5f27672fe 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -421,7 +421,7 @@ void setup_param_functions(Item_param *param, uchar param_type) static bool insert_params_withlog(PREP_STMT *stmt, uchar *pos, uchar *read_pos) { THD *thd= stmt->thd; - List<Item> ¶ms= thd->lex.param_list; + List<Item> ¶ms= thd->lex->param_list; List_iterator<Item> param_iterator(params); Item_param *param; DBUG_ENTER("insert_params_withlog"); @@ -467,7 +467,7 @@ static bool insert_params_withlog(PREP_STMT *stmt, uchar *pos, uchar *read_pos) static bool insert_params(PREP_STMT *stmt, uchar *pos, uchar *read_pos) { THD *thd= stmt->thd; - List<Item> ¶ms= thd->lex.param_list; + List<Item> ¶ms= thd->lex->param_list; List_iterator<Item> param_iterator(params); Item_param *param; DBUG_ENTER("insert_params"); @@ -493,7 +493,7 @@ static bool insert_params(PREP_STMT *stmt, uchar *pos, uchar *read_pos) static bool setup_params_data(PREP_STMT *stmt) { THD *thd= stmt->thd; - List<Item> ¶ms= thd->lex.param_list; + List<Item> ¶ms= thd->lex->param_list; List_iterator<Item> param_iterator(params); Item_param *param; DBUG_ENTER("setup_params_data"); @@ -538,8 +538,8 @@ static bool mysql_test_insert_fields(PREP_STMT *stmt, DBUG_ENTER("mysql_test_insert_fields"); #ifndef NO_EMBEDDED_ACCESS_CHECKS - my_bool update=(thd->lex.value_list.elements ? UPDATE_ACL : 0); - ulong privilege= (thd->lex.duplicates == DUP_REPLACE ? + my_bool update=(thd->lex->value_list.elements ? UPDATE_ACL : 0); + ulong privilege= (thd->lex->duplicates == DUP_REPLACE ? INSERT_ACL | DELETE_ACL : INSERT_ACL | update); if (check_access(thd,privilege,table_list->db, @@ -640,8 +640,8 @@ static bool mysql_test_select_fields(PREP_STMT *stmt, TABLE_LIST *tables, SELECT_LEX *select_lex) { THD *thd= stmt->thd; - LEX *lex= &thd->lex; - select_result *result= thd->lex.result; + LEX *lex= &thd->main_lex; + select_result *result= thd->lex->result; DBUG_ENTER("mysql_test_select_fields"); #ifndef NO_EMBEDDED_ACCESS_CHECKS @@ -668,7 +668,7 @@ static bool mysql_test_select_fields(PREP_STMT *stmt, TABLE_LIST *tables, } else { - fix_tables_pointers(thd->lex.all_selects_list); + fix_tables_pointers(thd->lex->all_selects_list); if (!result && !(result= new select_send())) { send_error(thd, ER_OUT_OF_RESOURCES); @@ -702,8 +702,8 @@ static bool mysql_test_select_fields(PREP_STMT *stmt, TABLE_LIST *tables, static bool send_prepare_results(PREP_STMT *stmt) { THD *thd= stmt->thd; - LEX *lex= &thd->lex; - enum enum_sql_command sql_command= thd->lex.sql_command; + LEX *lex= &thd->main_lex; + enum enum_sql_command sql_command= thd->lex->sql_command; DBUG_ENTER("send_prepare_results"); DBUG_PRINT("enter",("command: %d, param_count: %ld", sql_command, lex->param_count)); @@ -783,7 +783,7 @@ static bool parse_prepare_query(PREP_STMT *stmt, mysql_init_query(thd); LEX *lex=lex_start(thd, (uchar*) packet, length); lex->safe_to_cache_query= 0; - thd->lex.param_count= 0; + thd->lex->param_count= 0; if (!yyparse((void *)thd) && !thd->is_fatal_error) error= send_prepare_results(stmt); lex_end(lex); @@ -797,11 +797,11 @@ static bool parse_prepare_query(PREP_STMT *stmt, static bool init_param_items(PREP_STMT *stmt) { THD *thd= stmt->thd; - List<Item> ¶ms= thd->lex.param_list; + List<Item> ¶ms= thd->lex->param_list; Item_param **to; uint32 length= thd->query_length; - stmt->lex= thd->lex; + stmt->lex= thd->main_lex; if (mysql_bin_log.is_open() || mysql_update_log.is_open()) { @@ -850,7 +850,7 @@ static bool init_param_items(PREP_STMT *stmt) static void init_stmt_execute(PREP_STMT *stmt) { THD *thd= stmt->thd; - TABLE_LIST *tables= (TABLE_LIST*) thd->lex.select_lex.table_list.first; + TABLE_LIST *tables= (TABLE_LIST*) thd->lex->select_lex.table_list.first; /* TODO: When the new table structure is ready, then have a status bit @@ -908,7 +908,7 @@ bool mysql_stmt_prepare(THD *thd, char *packet, uint packet_length) my_pthread_setprio(pthread_self(),WAIT_PRIOR); // save WHERE clause pointers to avoid damaging they by optimisation - for (sl= thd->lex.all_selects_list; + for (sl= thd->lex->all_selects_list; sl; sl= sl->next_select_in_list()) { @@ -961,8 +961,8 @@ void mysql_stmt_execute(THD *thd, char *packet) DBUG_VOID_RETURN; } - LEX thd_lex= thd->lex; - thd->lex= stmt->lex; + LEX thd_lex= thd->main_lex; + thd->main_lex= stmt->lex; for (sl= stmt->lex.all_selects_list; sl; @@ -1001,7 +1001,7 @@ void mysql_stmt_execute(THD *thd, char *packet) if (!(specialflag & SPECIAL_NO_PRIOR)) my_pthread_setprio(pthread_self(), WAIT_PRIOR); - thd->lex= thd_lex; + thd->main_lex= thd_lex; DBUG_VOID_RETURN; } |