Lines Matching +refs:new +refs:lex

42 #define Lex (YYTHD->lex)
127 #define NEW_PTN new(YYTHD->mem_root)
300 LEX *lex= thd->lex;
301 sp_head *sp= lex->sphead;
302 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
318 @param lex the parser lex context
321 bool case_stmt_action_then(THD *thd, LEX *lex)
323 sp_head *sp= lex->sphead;
324 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
327 new (thd->mem_root) sp_instr_jump(sp->instructions(), pctx);
352 @param lex the parser lex context
356 void case_stmt_action_end_case(LEX *lex, bool simple)
358 sp_head *sp= lex->sphead;
359 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
375 static bool add_create_index_prepare (LEX *lex, Table_ident *table)
377 lex->sql_command= SQLCOM_CREATE_INDEX;
378 if (!lex->current_select()->add_table_to_list(lex->thd, table, NULL,
383 lex->alter_info.reset();
384 lex->alter_info.flags= Alter_info::ALTER_ADD_INDEX;
385 lex->col_list.empty();
386 lex->change= NullS;
390 static bool add_create_index (LEX *lex, keytype type,
395 key= new Key(type, name, info ? info : &lex->key_create_info, generated,
396 lex->col_list);
400 lex->alter_info.key_list.push_back(key);
401 lex->col_list.empty();
462 %lex-param { class THD *YYTHD }
466 We should not introduce new conflicts any more.
481 INTERNAL : Not a real token, lex optimization
488 %token ABORT_SYM /* INTERNAL (used in lex) */
1641 thd->lex->sql_command= SQLCOM_EMPTY_QUERY;
1749 LEX *lex= thd->lex;
1750 lex->sql_command= SQLCOM_DEALLOCATE_PREPARE;
1751 lex->prepared_stmt_name= to_lex_cstring($3);
1764 LEX *lex= thd->lex;
1765 lex->sql_command= SQLCOM_PREPARE;
1766 lex->prepared_stmt_name= to_lex_cstring($2);
1776 lex->contains_plaintext_password= true;
1784 LEX *lex= thd->lex;
1785 lex->prepared_stmt_code= $1;
1786 lex->prepared_stmt_code_is_varref= FALSE;
1791 LEX *lex= thd->lex;
1792 lex->prepared_stmt_code= $2;
1793 lex->prepared_stmt_code_is_varref= TRUE;
1801 LEX *lex= thd->lex;
1802 lex->sql_command= SQLCOM_EXECUTE;
1803 lex->prepared_stmt_name= to_lex_cstring($2);
1822 LEX *lex=Lex;
1824 if (!lexstr || lex->prepared_stmt_params.push_back(lexstr))
1842 LEX *lex= Lex;
1843 lex->sql_command= SQLCOM_HELP;
1844 lex->help_arg= $3.str;
1853 LEX *lex = Lex;
1854 lex->sql_command = SQLCOM_CHANGE_MASTER;
1860 lex->mi.set_unspecified();
1867 LEX* lex= thd->lex;
1868 assert(!lex->m_sql_cmd);
1869 lex->sql_command = SQLCOM_CHANGE_REPLICATION_FILTER;
1870 lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_change_repl_filter();
1871 if (lex->m_sql_cmd == NULL)
1937 $$= new (YYTHD->mem_root) List<Item>;
1950 $$= new (YYTHD->mem_root) List<Item>;
1966 Item *db_item= new (thd->mem_root) Item_string($1.str,
1975 $$= new (YYTHD->mem_root) List<Item>;
1987 $$= new (YYTHD->mem_root) List<Item>;
2003 $$= new (YYTHD->mem_root) List<Item>;
2016 $$= new (YYTHD->mem_root) List<Item>;
2032 Item_string *table_item= new (thd->mem_root) Item_string($1.str,
2044 $$= new (YYTHD->mem_root) List<Item>;
2057 $$= new (YYTHD->mem_root) List<Item>;
2073 Item *string_item= new (thd->mem_root) Item_string($1.str,
2295 LEX *lex= thd->lex;
2296 lex->sql_command= SQLCOM_CREATE_TABLE;
2297 if (!lex->select_lex->add_table_to_list(thd, $5, NULL,
2307 lex->query_tables->open_strategy= TABLE_LIST::OPEN_FOR_CREATE;
2308 lex->alter_info.reset();
2309 lex->col_list.empty();
2310 lex->change=NullS;
2311 new (&lex->create_info) HA_CREATE_INFO;
2312 lex->create_info.options=$2 | $4;
2313 lex->create_info.default_table_charset= NULL;
2314 lex->name.str= 0;
2315 lex->name.length= 0;
2316 lex->create_last_non_select_table= lex->last_table();
2321 LEX *lex= thd->lex;
2322 lex->set_current_select(lex->select_lex);
2323 if ((lex->create_info.used_fields & HA_CREATE_USED_ENGINE) &&
2324 !lex->create_info.db_type)
2326 lex->create_info.db_type=
2327 lex->create_info.options & HA_LEX_CREATE_TMP_TABLE ?
2332 ha_resolve_storage_engine_name(lex->create_info.db_type),
2335 create_table_set_open_action_and_adjust_tables(lex);
2379 LEX *lex=Lex;
2380 lex->sql_command=SQLCOM_CREATE_DB;
2381 lex->name= $4;
2382 lex->create_info.options=$3;
2395 LEX *lex=Lex;
2396 lex->sql_command = SQLCOM_CREATE_USER;
2397 lex->create_info.options=$3;
2419 new (YYTHD->mem_root) Sql_cmd_create_server(&Lex->server_options);
2498 LEX *lex=Lex;
2500 lex->stmt_definition_begin= @1.cpp.start;
2501 lex->create_info.options= $2;
2502 if (!(lex->event_parse_data= Event_parse_data::new_instance(thd)))
2504 lex->event_parse_data->identifier= $3;
2505 lex->event_parse_data->on_completion=
2508 lex->sql_command= SQLCOM_CREATE_EVENT;
2568 Item *item= new (YYTHD->mem_root) Item_func_now_local(0);
2623 LEX *lex= thd->lex;
2642 if (lex->sphead)
2650 lex->event_parse_data->identifier);
2655 lex->sphead= sp;
2657 memset(&lex->sp_chistics, 0, sizeof(st_sp_chistics));
2658 sp->m_chistics= &lex->sp_chistics;
2669 LEX *lex= thd->lex;
2673 lex->sp_chistics.suid= SP_IS_SUID; //always the definer!
2674 lex->event_parse_data->body_changed= TRUE;
2697 LEX *lex=Lex;
2698 lex->users_list.empty();
2699 lex->columns.empty();
2700 lex->grant= lex->grant_tot_col= 0;
2701 lex->all_privileges= 0;
2702 lex->select_lex->db= NULL;
2703 lex->ssl_type= SSL_TYPE_NOT_SPECIFIED;
2704 lex->ssl_cipher= lex->x509_subject= lex->x509_issuer= 0;
2705 lex->alter_password.update_account_locked_column= false;
2706 lex->alter_password.account_locked= false;
2707 memset(&(lex->mqh), 0, sizeof(lex->mqh));
2714 LEX *lex=Lex;
2715 lex->alter_password.update_password_expired_fields= false;
2716 lex->alter_password.update_password_expired_column= false;
2717 lex->alter_password.use_default_password_lifetime= true;
2718 lex->alter_password.expire_after_days= 0;
2732 $$= new sp_name(to_lex_cstring($1), $3, true);
2740 LEX *lex= thd->lex;
2746 if (lex->copy_db_to(&db.str, &db.length))
2748 $$= new sp_name(to_lex_cstring(db), $1, false);
2804 LEX *lex = Lex;
2806 lex->sql_command= SQLCOM_CALL;
2807 lex->spname= $2;
2808 lex->call_value_list.empty();
2809 sp_add_used_routine(lex, YYTHD, $2, SP_TYPE_PROCEDURE);
2854 LEX *lex= Lex;
2856 lex->length= 0;
2857 lex->dec= 0;
2858 lex->type= 0;
2860 lex->default_value= 0;
2861 lex->on_update_value= 0;
2863 lex->comment= null_lex_str;
2864 lex->charset= NULL;
2866 lex->interval_list.empty();
2867 lex->uint_geom_type= 0;
2875 LEX *lex= thd->lex;
2876 sp_head *sp= lex->sphead;
2877 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
2916 LEX *lex= thd->lex;
2917 sp_head *sp= lex->sphead;
2918 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
2993 LEX *lex= thd->lex;
2994 sp_head *sp= lex->sphead;
2995 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
3004 LEX *lex= thd->lex;
3005 sp_head *sp= lex->sphead;
3006 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
3029 if (lex->is_metadata_used())
3039 dflt_value_item= new (thd->mem_root) Item_null();
3077 item->m_sp = lex->sphead;
3096 new (thd->mem_root)
3098 lex,
3117 LEX *lex= thd->lex;
3118 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
3127 lex->keep_diagnostics= DA_KEEP_DIAGNOSTICS; // DECLARE COND FOR
3134 LEX *lex= thd->lex;
3135 sp_head *sp= lex->sphead;
3137 sp_pcontext *parent_pctx= lex->get_sp_current_parsing_ctx();
3145 lex->set_sp_current_parsing_ctx(handler_pctx);
3148 new (thd->mem_root)
3171 lex->keep_diagnostics= DA_KEEP_DIAGNOSTICS; // DECL HANDLER FOR
3176 LEX *lex= Lex;
3177 sp_head *sp= lex->sphead;
3178 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
3184 new (thd->mem_root) sp_instr_hreturn(sp->instructions(), pctx);
3192 new (thd->mem_root) sp_instr_hreturn(sp->instructions(), pctx);
3202 lex->set_sp_current_parsing_ctx(pctx->pop_context());
3213 LEX *lex= Lex;
3214 sp_head *sp= lex->sphead;
3241 LEX *lex= Lex;
3242 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
3267 new (thd->mem_root)
3300 LEX *lex= Lex;
3301 sp_head *sp= lex->sphead;
3302 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
3328 $$= new (YYTHD->mem_root) sp_condition_value($1);
3351 $$= new (YYTHD->mem_root) sp_condition_value($3.str);
3369 LEX *lex= Lex;
3370 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
3382 $$= new (YYTHD->mem_root) sp_condition_value(sp_condition_value::WARNING);
3388 $$= new (YYTHD->mem_root) sp_condition_value(sp_condition_value::NOT_FOUND);
3394 $$= new (YYTHD->mem_root) sp_condition_value(sp_condition_value::EXCEPTION);
3404 LEX *lex= thd->lex;
3406 lex->sql_command= SQLCOM_SIGNAL;
3407 lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_signal($2, $3);
3408 if (lex->m_sql_cmd == NULL)
3416 LEX *lex= Lex;
3417 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
3453 { $$= new (YYTHD->mem_root) Set_signal_information(); }
3461 $$= new (YYTHD->mem_root) Set_signal_information();
3536 LEX *lex= thd->lex;
3538 lex->sql_command= SQLCOM_RESIGNAL;
3539 lex->keep_diagnostics= DA_KEEP_DIAGNOSTICS; // RESIGNAL doesn't clear diagnostics
3540 lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_resignal($2, $3);
3541 if (lex->m_sql_cmd == NULL)
3555 Lex->m_sql_cmd= new (YYTHD->mem_root) Sql_cmd_get_diagnostics(info);
3574 $$= new (YYTHD->mem_root) Statement_information($1);
3580 $$= new (YYTHD->mem_root) Condition_information($2, $3);
3589 $$= new (YYTHD->mem_root) List<Statement_information_item>;
3604 $$= new (YYTHD->mem_root) Statement_information_item($3, $1);
3613 LEX *lex= thd->lex;
3614 sp_head *sp= lex->sphead;
3617 NOTE: lex->sphead is NULL if we're parsing something like
3664 $$= new (YYTHD->mem_root) List<Condition_information_item>;
3679 $$= new (YYTHD->mem_root) Condition_information_item($3, $1);
3719 LEX *lex= thd->lex;
3720 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
3739 LEX *lex= thd->lex;
3740 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
3799 LEX *lex= thd->lex;
3800 sp_head *sp= lex->sphead;
3808 LEX *lex= thd->lex;
3809 sp_head *sp= lex->sphead;
3811 sp->m_flags|= sp_get_flags_for_command(lex);
3812 if (lex->sql_command == SQLCOM_CHANGE_DB)
3822 assert(lex->sql_command != SQLCOM_SET_OPTION ||
3823 lex->var_list.is_empty());
3824 if (lex->sql_command != SQLCOM_SET_OPTION)
3839 new (thd->mem_root)
3840 sp_instr_stmt(sp->instructions(), lex, query);
3855 LEX *lex= thd->lex;
3856 sp_head *sp= lex->sphead;
3867 LEX *lex= thd->lex;
3868 sp_head *sp= lex->sphead;
3875 if (lex->is_metadata_used())
3897 new (thd->mem_root)
3898 sp_instr_freturn(sp->instructions(), lex, $3, expr_query,
3913 LEX *lex= thd->lex;
3914 sp_head *sp= lex->sphead;
3915 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
3923 LEX *lex= Lex;
3924 sp_head *sp= lex->sphead;
3925 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
3936 LEX *lex= Lex;
3937 sp_head *sp = lex->sphead;
3938 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
3964 new (thd->mem_root) sp_instr_hpop(ip++, pctx);
3975 new (thd->mem_root) sp_instr_cpop(ip++, pctx, n);
3981 sp_instr_jump *i= new (thd->mem_root) sp_instr_jump(ip, pctx);
3995 LEX *lex= Lex;
3996 sp_head *sp= lex->sphead;
3997 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
4014 new (thd->mem_root) sp_instr_hpop(ip++, pctx);
4026 new (thd->mem_root) sp_instr_cpop(ip++, pctx, n);
4034 new (thd->mem_root) sp_instr_jump(ip, pctx, lab->ip);
4045 LEX *lex= Lex;
4046 sp_head *sp= lex->sphead;
4047 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
4057 new (thd->mem_root)
4069 LEX *lex= Lex;
4070 sp_head *sp= lex->sphead;
4071 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
4081 new (thd->mem_root)
4095 LEX *lex= Lex;
4096 sp_head *sp= lex->sphead;
4097 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
4107 new (thd->mem_root)
4124 LEX *lex= Lex;
4125 sp_head *sp= lex->sphead;
4126 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
4142 LEX *lex= Lex;
4143 sp_head *sp= lex->sphead;
4144 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
4163 LEX *lex= thd->lex;
4164 sp_head *sp= lex->sphead;
4174 LEX *lex= Lex;
4175 sp_head *sp= lex->sphead;
4176 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
4183 if (lex->is_metadata_used())
4191 new (thd->mem_root)
4192 sp_instr_jump_if_not(sp->instructions(), lex,
4211 LEX *lex= thd->lex;
4212 sp_head *sp= lex->sphead;
4213 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
4216 new (thd->mem_root) sp_instr_jump(sp->instructions(), pctx);
4229 LEX *lex= Lex;
4230 sp_head *sp= lex->sphead;
4231 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
4253 LEX *lex= thd->lex;
4254 sp_head *sp= lex->sphead;
4266 LEX *lex= Lex;
4267 sp_head *sp= lex->sphead;
4274 if (lex->is_metadata_used())
4281 /* Register new CASE-expression and get its id. */
4283 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
4292 new (thd->mem_root)
4293 sp_instr_set_case_expr(sp->instructions(), lex,
4341 LEX *lex= thd->lex;
4342 sp_head *sp= lex->sphead;
4354 LEX *lex= thd->lex;
4355 sp_head *sp= lex->sphead;
4356 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
4363 if (lex->is_metadata_used())
4373 new (thd->mem_root)
4374 sp_instr_jump_case_when(sp->instructions(), lex,
4401 LEX *lex= thd->lex;
4402 sp_head *sp= lex->sphead;
4412 LEX *lex= thd->lex;
4413 sp_head *sp= lex->sphead;
4414 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
4421 if (lex->is_metadata_used())
4431 new (thd->mem_root)
4432 sp_instr_jump_if_not(sp->instructions(), lex, $3, when_query);
4456 LEX *lex= Lex;
4457 sp_head *sp= lex->sphead;
4458 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
4461 new (thd->mem_root)
4473 LEX *lex= Lex;
4474 sp_head *sp= lex->sphead;
4475 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
4491 LEX *lex= Lex;
4492 sp_head *sp= lex->sphead;
4493 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
4516 LEX *lex= Lex;
4517 sp_head *sp= lex->sphead;
4518 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
4532 LEX *lex= Lex;
4533 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
4549 LEX *lex= Lex;
4550 sp_head *sp= lex->sphead;
4551 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
4560 LEX *lex= Lex;
4561 lex->get_sp_current_parsing_ctx()->pop_label();
4571 LEX *lex= thd->lex;
4572 sp_pcontext *parent_pctx= lex->get_sp_current_parsing_ctx();
4577 lex->set_sp_current_parsing_ctx(child_pctx);
4584 LEX *lex= Lex;
4585 sp_head *sp= lex->sphead;
4586 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
4595 new (thd->mem_root) sp_instr_hpop(sp->instructions(), pctx);
4604 new (thd->mem_root)
4611 lex->set_sp_current_parsing_ctx(pctx->pop_context());
4620 LEX *lex= Lex;
4621 sp_head *sp= lex->sphead;
4622 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
4625 new (thd->mem_root)
4635 LEX *lex= thd->lex;
4636 sp_head *sp= lex->sphead;
4646 LEX *lex= Lex;
4647 sp_head *sp= lex->sphead;
4648 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
4655 if (lex->is_metadata_used())
4665 new (thd->mem_root)
4666 sp_instr_jump_if_not(sp->instructions(), lex, $3, expr_query);
4685 LEX *lex= Lex;
4686 sp_head *sp= lex->sphead;
4687 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
4690 new (thd->mem_root)
4703 LEX *lex= thd->lex;
4704 sp_head *sp= lex->sphead;
4714 LEX *lex= thd->lex;
4715 sp_head *sp= lex->sphead;
4716 sp_pcontext *pctx= lex->get_sp_current_parsing_ctx();
4724 if (lex->is_metadata_used())
4734 new (thd->mem_root)
4735 sp_instr_jump_if_not(ip, lex, $5, expr_query,
4802 LEX *lex= Lex;
4803 lex->alter_tablespace_info->logfile_group_name= $4.str;
4941 LEX *lex= Lex;
4942 lex->alter_tablespace_info->data_file_name= $2.str;
4949 LEX *lex= Lex;
4950 lex->alter_tablespace_info->undo_file_name= $2.str;
4957 LEX *lex= Lex;
4958 lex->alter_tablespace_info->redo_file_name= $2.str;
4965 LEX *lex= Lex;
4966 lex->alter_tablespace_info= new st_alter_tablespace();
4967 if (lex->alter_tablespace_info == NULL)
4969 lex->alter_tablespace_info->tablespace_name= $1.str;
4970 lex->sql_command= SQLCOM_ALTER_TABLESPACE;
4977 LEX *lex= Lex;
4978 lex->alter_tablespace_info= new st_alter_tablespace();
4979 if (lex->alter_tablespace_info == NULL)
4981 lex->alter_tablespace_info->logfile_group_name= $1.str;
4982 lex->sql_command= SQLCOM_ALTER_TABLESPACE;
4989 LEX *lex= Lex;
4990 lex->alter_tablespace_info->ts_access_mode= TS_READ_ONLY;
4994 LEX *lex= Lex;
4995 lex->alter_tablespace_info->ts_access_mode= TS_READ_WRITE;
4999 LEX *lex= Lex;
5000 lex->alter_tablespace_info->ts_access_mode= TS_NOT_ACCESSIBLE;
5007 LEX *lex= Lex;
5008 lex->alter_tablespace_info->initial_size= $3;
5015 LEX *lex= Lex;
5016 lex->alter_tablespace_info->autoextend_size= $3;
5023 LEX *lex= Lex;
5024 lex->alter_tablespace_info->max_size= $3;
5031 LEX *lex= Lex;
5032 lex->alter_tablespace_info->extent_size= $3;
5039 LEX *lex= Lex;
5040 lex->alter_tablespace_info->undo_buffer_size= $3;
5047 LEX *lex= Lex;
5048 lex->alter_tablespace_info->redo_buffer_size= $3;
5055 LEX *lex= Lex;
5056 if (lex->alter_tablespace_info->nodegroup_id != UNDEF_NODEGROUP)
5061 lex->alter_tablespace_info->nodegroup_id= $3;
5068 LEX *lex= Lex;
5069 if (lex->alter_tablespace_info->ts_comment != NULL)
5074 lex->alter_tablespace_info->ts_comment= $3.str;
5081 LEX *lex= Lex;
5082 if (lex->alter_tablespace_info->storage_engine != NULL)
5088 lex->alter_tablespace_info->storage_engine= $4;
5095 LEX *lex= Lex;
5096 if (lex->alter_tablespace_info->file_block_size != 0)
5102 lex->alter_tablespace_info->file_block_size= $3;
5117 LEX *lex= Lex;
5118 lex->alter_tablespace_info->wait_until_completed= TRUE;
5122 LEX *lex= Lex;
5123 if (!(lex->alter_tablespace_info->wait_until_completed))
5128 lex->alter_tablespace_info->wait_until_completed= FALSE;
5195 LEX *lex= thd->lex;
5197 lex->create_info.options|= HA_LEX_CREATE_TABLE_LIKE;
5198 src_table= lex->select_lex->add_table_to_list(thd, $2, NULL, 0,
5210 LEX *lex= thd->lex;
5212 lex->create_info.options|= HA_LEX_CREATE_TABLE_LIKE;
5213 src_table= lex->select_lex->add_table_to_list(thd, $3, NULL, 0,
5288 The first place is called when a new table is created from a MySQL client.
5309 LEX *lex= Lex;
5310 lex->part_info= new partition_info();
5311 if (!lex->part_info)
5316 if (lex->sql_command == SQLCOM_ALTER_TABLE)
5318 lex->alter_info.flags|= Alter_info::ALTER_PARTITION;
5327 LEX *lex= Lex;
5328 if (!lex->part_info)
5520 LEX *lex= Lex;
5522 not_corr_func= !lex->safe_to_cache_query;
5523 lex->safe_to_cache_query= 1;
5538 LEX *lex= Lex;
5544 lex->part_info->num_subparts= num_parts;
5545 lex->part_info->use_default_num_subpartitions= FALSE;
5596 partition_element *p_elem= new partition_element();
5634 LEX *lex= Lex;
5635 partition_info *part_info= lex->part_info;
5653 LEX *lex= Lex;
5654 partition_info *part_info= lex->part_info;
5667 LEX *lex= Lex;
5668 partition_info *part_info= lex->part_info;
5710 LEX *lex= Lex;
5711 partition_info *part_info= lex->part_info;
5716 if (!lex->is_partition_management() ||
5813 LEX *lex= Lex;
5814 partition_info *part_info= lex->part_info;
5817 if (!lex->safe_to_cache_query)
5880 partition_element *sub_p_elem= new partition_element(curr_part);
6191 LEX *lex=Lex;
6192 lex->create_info.merge_list= lex->select_lex->table_list;
6193 lex->select_lex->table_list= lex->save_list;
6199 TABLE_LIST *last_non_sel_table= lex->create_last_non_select_table;
6201 lex->create_info.merge_list.first);
6205 lex->create_info.used_fields|= HA_CREATE_USED_UNION;
6287 thd->lex->create_info.options & HA_LEX_CREATE_TMP_TABLE);
6311 LEX *lex= thd->lex;
6314 lex->create_info.options & HA_LEX_CREATE_TMP_TABLE);
6414 LEX *lex=Lex;
6415 Key *key= new Foreign_key($4.str ? $4 : $1, lex->col_list,
6418 lex->ref_list,
6419 lex->fk_delete_opt,
6420 lex->fk_update_opt,
6421 lex->fk_match_option);
6424 lex->alter_info.key_list.push_back(key);
6425 if (add_create_index (lex, KEYTYPE_MULTIPLE, $1.str ? $1 : $4,
6429 lex->alter_info.flags|= Alter_info::ADD_FOREIGN_KEY;
6462 LEX *lex=Lex;
6463 lex->length=lex->dec=0;
6464 lex->type=0;
6465 lex->default_value= lex->on_update_value= 0;
6466 lex->comment=null_lex_str;
6467 lex->charset=NULL;
6468 lex->zip_dict_name=null_lex_cstr;
6469 lex->gcol_info= 0;
6473 LEX *lex=Lex;
6474 if (add_field_to_list(lex->thd, &$1, (enum enum_field_types) $3,
6475 lex->length,lex->dec,lex->type,
6476 lex->default_value, lex->on_update_value,
6477 &lex->comment,
6478 lex->change,&lex->interval_list,lex->charset,
6479 lex->uint_geom_type,
6480 &lex->zip_dict_name,
6481 lex->gcol_info))
6523 LEX *lex=Lex;
6524 lex->type|= UNIQUE_FLAG;
6525 lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX;
6529 LEX *lex=Lex;
6530 lex->type|= UNIQUE_KEY_FLAG;
6531 lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX;
6538 LEX *lex=Lex;
6539 lex->type|= PRI_KEY_FLAG | NOT_NULL_FLAG;
6540 lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX;
6585 Lex->gcol_info= new Generated_column();
7034 Item *item= new (YYTHD->mem_root)
7043 LEX *lex=Lex;
7044 lex->type|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNIQUE_FLAG;
7045 lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX;
7049 LEX *lex=Lex;
7050 lex->type|= PRI_KEY_FLAG | NOT_NULL_FLAG;
7051 lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX;
7055 LEX *lex=Lex;
7057 lex->type|= UNIQUE_FLAG;
7059 lex->type|= CLUSTERING_FLAG;
7060 lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX;
7064 LEX *lex=Lex;
7066 lex->type|= UNIQUE_KEY_FLAG;
7068 lex->type|= CLUSTERING_FLAG;
7069 lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX;
7170 $$= new (YYTHD->mem_root)
7416 Key_part_spec *key= new Key_part_spec($3, 0);
7423 Key_part_spec *key= new Key_part_spec($1, 0);
7426 LEX *lex= Lex;
7427 lex->ref_list.empty();
7428 lex->ref_list.push_back(key);
7446 LEX *lex= Lex;
7447 lex->fk_update_opt= FK_OPTION_UNDEF;
7448 lex->fk_delete_opt= FK_OPTION_UNDEF;
7452 LEX *lex= Lex;
7453 lex->fk_update_opt= $3;
7454 lex->fk_delete_opt= FK_OPTION_UNDEF;
7458 LEX *lex= Lex;
7459 lex->fk_update_opt= FK_OPTION_UNDEF;
7460 lex->fk_delete_opt= $3;
7465 LEX *lex= Lex;
7466 lex->fk_update_opt= $3;
7467 lex->fk_delete_opt= $6;
7472 LEX *lex= Lex;
7473 lex->fk_update_opt= $6;
7474 lex->fk_delete_opt= $3;
7569 For now, key_alg initializies lex->key_create_info.
7664 $$= new Key_part_spec($1, 0);
7675 $$= new Key_part_spec($1, (uint) key_part_len);
7703 LEX *lex= thd->lex;
7704 lex->name.str= 0;
7705 lex->name.length= 0;
7706 lex->sql_command= SQLCOM_ALTER_TABLE;
7707 lex->duplicates= DUP_ERROR;
7708 if (!lex->select_lex->add_table_to_list(thd, $3, NULL,
7713 lex->col_list.empty();
7714 lex->select_lex->init_order();
7715 lex->select_lex->db=
7716 const_cast<char*>((lex->select_lex->table_list.first)->db);
7717 new (&lex->create_info) HA_CREATE_INFO;
7718 lex->create_info.db_type= 0;
7719 lex->create_info.default_table_charset= NULL;
7720 lex->create_info.row_type= ROW_TYPE_NOT_USED;
7721 lex->alter_info.reset();
7722 lex->no_write_to_binlog= 0;
7723 lex->create_info.storage_media= HA_SM_DEFAULT;
7724 lex->create_last_non_select_table= lex->last_table();
7725 assert(!lex->m_sql_cmd);
7730 LEX *lex= thd->lex;
7731 if (!lex->m_sql_cmd)
7734 lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_table();
7735 if (lex->m_sql_cmd == NULL)
7746 LEX *lex=Lex;
7747 lex->sql_command=SQLCOM_ALTER_DB;
7748 lex->name= $3;
7749 if (lex->name.str == NULL &&
7750 lex->copy_db_to(&lex->name.str, &lex->name.length))
7755 LEX *lex= Lex;
7758 if (lex->sphead)
7763 lex->sql_command= SQLCOM_ALTER_DB_UPGRADE;
7764 lex->name= $3;
7768 LEX *lex= Lex;
7770 if (lex->sphead)
7775 memset(&lex->sp_chistics, 0, sizeof(st_sp_chistics));
7779 LEX *lex=Lex;
7781 lex->sql_command= SQLCOM_ALTER_PROCEDURE;
7782 lex->spname= $3;
7786 LEX *lex= Lex;
7788 if (lex->sphead)
7793 memset(&lex->sp_chistics, 0, sizeof(st_sp_chistics));
7797 LEX *lex=Lex;
7799 lex->sql_command= SQLCOM_ALTER_FUNCTION;
7800 lex->spname= $3;
7804 LEX *lex= Lex;
7806 if (lex->sphead)
7811 lex->create_view_mode= VIEW_ALTER;
7822 LEX *lex= Lex;
7824 if (lex->sphead)
7829 lex->create_view_algorithm= VIEW_ALGORITHM_UNDEFINED;
7830 lex->create_view_mode= VIEW_ALTER;
7869 LEX *lex= Lex;
7870 lex->alter_tablespace_info->ts_cmd_type= ALTER_TABLESPACE;
7874 LEX *lex= Lex;
7875 lex->alter_tablespace_info->ts_cmd_type= ALTER_LOGFILE_GROUP;
7879 LEX *lex= Lex;
7880 lex->alter_tablespace_info->ts_cmd_type= CHANGE_FILE_TABLESPACE;
7884 LEX *lex= Lex;
7885 lex->alter_tablespace_info->ts_cmd_type= ALTER_ACCESS_MODE_TABLESPACE;
7889 LEX *lex= Lex;
7890 lex->sql_command= SQLCOM_ALTER_SERVER;
7891 lex->server_options.m_server_name= $3;
7892 lex->m_sql_cmd=
7893 new (YYTHD->mem_root) Sql_cmd_alter_server(&Lex->server_options);
7910 LEX *lex= Lex;
7911 lex->sql_command= SQLCOM_ALTER_USER;
7912 lex->drop_if_exists= $3;
7929 LEX *lex=Lex;
7930 lex->alter_password.update_account_locked_column= true;
7931 lex->alter_password.account_locked= false;
7935 LEX *lex=Lex;
7936 lex->alter_password.update_account_locked_column= true;
7937 lex->alter_password.account_locked= true;
7941 LEX *lex=Lex;
7942 lex->alter_password.update_password_expired_fields= true;
7943 lex->alter_password.update_password_expired_column= true;
7947 LEX *lex=Lex;
7955 lex->alter_password.update_password_expired_fields= true;
7956 lex->alter_password.expire_after_days= $3;
7957 lex->alter_password.use_default_password_lifetime= false;
7961 LEX *lex=Lex;
7962 lex->alter_password.update_password_expired_fields= true;
7963 lex->alter_password.use_default_password_lifetime= false;
7988 LEX *lex=Lex;
7989 lex->mqh.questions=$2;
7990 lex->mqh.specified_limits|= USER_RESOURCES::QUERIES_PER_HOUR;
7994 LEX *lex=Lex;
7995 lex->mqh.updates=$2;
7996 lex->mqh.specified_limits|= USER_RESOURCES::UPDATES_PER_HOUR;
8000 LEX *lex=Lex;
8001 lex->mqh.conn_per_hour= $2;
8002 lex->mqh.specified_limits|= USER_RESOURCES::CONNECTIONS_PER_HOUR;
8006 LEX *lex=Lex;
8007 lex->mqh.user_conn= $2;
8008 lex->mqh.specified_limits|= USER_RESOURCES::USER_CONNECTIONS;
8038 Use lex's spname to hold the new name.
8074 Lex->m_sql_cmd= new (YYTHD->mem_root)
8082 Lex->m_sql_cmd= new (YYTHD->mem_root)
8103 LEX *lex= Lex;
8104 lex->alter_info.flags|= Alter_info::ALTER_REBUILD_PARTITION;
8105 lex->no_write_to_binlog= $3;
8111 LEX *lex= thd->lex;
8112 lex->no_write_to_binlog= $3;
8113 lex->check_opt.init();
8114 assert(!lex->m_sql_cmd);
8115 lex->m_sql_cmd= new (thd->mem_root)
8117 if (lex->m_sql_cmd == NULL)
8125 LEX *lex= thd->lex;
8126 lex->no_write_to_binlog= $3;
8127 lex->check_opt.init();
8128 assert(!lex->m_sql_cmd);
8129 lex->m_sql_cmd= new (thd->mem_root)
8131 if (lex->m_sql_cmd == NULL)
8137 LEX *lex= thd->lex;
8138 lex->check_opt.init();
8139 assert(!lex->m_sql_cmd);
8140 lex->m_sql_cmd= new (thd->mem_root)
8142 if (lex->m_sql_cmd == NULL)
8150 LEX *lex= thd->lex;
8151 lex->no_write_to_binlog= $3;
8152 lex->check_opt.init();
8153 assert(!lex->m_sql_cmd);
8154 lex->m_sql_cmd= new (thd->mem_root)
8156 if (lex->m_sql_cmd == NULL)
8162 LEX *lex= Lex;
8163 lex->alter_info.flags|= Alter_info::ALTER_COALESCE_PARTITION;
8164 lex->no_write_to_binlog= $3;
8165 lex->alter_info.num_parts= $4;
8170 LEX *lex= thd->lex;
8171 lex->check_opt.init();
8172 assert(!lex->m_sql_cmd);
8173 lex->m_sql_cmd= new (thd->mem_root)
8175 if (lex->m_sql_cmd == NULL)
8183 LEX *lex= thd->lex;
8185 lex->select_lex->db= const_cast<char*>($6->db.str);
8186 if (lex->select_lex->db == NULL &&
8187 lex->copy_db_to(&lex->select_lex->db, &dummy))
8191 lex->name.str= const_cast<char*>($6->table.str);
8192 lex->name.length= $6->table.length;
8193 lex->alter_info.flags|= Alter_info::ALTER_EXCHANGE_PARTITION;
8194 if (!lex->select_lex->add_table_to_list(thd, $6, NULL,
8199 assert(!lex->m_sql_cmd);
8200 lex->m_sql_cmd= new (thd->mem_root)
8202 if (lex->m_sql_cmd == NULL)
8208 Lex->m_sql_cmd= new (YYTHD->mem_root)
8217 Lex->m_sql_cmd= new (YYTHD->mem_root)
8260 LEX *lex= Lex;
8261 lex->part_info= new partition_info();
8262 if (!lex->part_info)
8267 lex->alter_info.flags|= Alter_info::ALTER_ADD_PARTITION;
8268 lex->no_write_to_binlog= $3;
8278 LEX *lex= Lex;
8279 lex->part_info->num_parts= lex->part_info->partitions.elements;
8290 LEX *lex= Lex;
8291 lex->part_info= new partition_info();
8292 if (!lex->part_info)
8297 lex->no_write_to_binlog= $3;
8326 String *s= new (YYTHD->mem_root) String((const char *) $1.str,
8357 LEX *lex=Lex;
8358 lex->change=0;
8359 lex->alter_info.flags|= Alter_info::ALTER_ADD_COLUMN;
8376 LEX *lex=Lex;
8377 lex->change= $3.str;
8378 lex->alter_info.flags|= Alter_info::ALTER_CHANGE_COLUMN;
8386 LEX *lex=Lex;
8387 lex->length=lex->dec=0; lex->type=0;
8388 lex->default_value= lex->on_update_value= 0;
8389 lex->comment=null_lex_str;
8390 lex->charset= NULL;
8391 lex->alter_info.flags|= Alter_info::ALTER_CHANGE_COLUMN;
8392 lex->zip_dict_name= null_lex_cstr;
8393 lex->gcol_info= 0;
8397 LEX *lex=Lex;
8398 if (add_field_to_list(lex->thd,&$3,
8400 lex->length,lex->dec,lex->type,
8401 lex->default_value, lex->on_update_value,
8402 &lex->comment,
8403 $3.str, &lex->interval_list, lex->charset,
8404 lex->uint_geom_type, &lex->zip_dict_name,
8405 lex->gcol_info))
8414 LEX *lex=Lex;
8415 Alter_drop *ad= new Alter_drop(Alter_drop::COLUMN, $3.str);
8418 lex->alter_info.drop_list.push_back(ad);
8419 lex->alter_info.flags|= Alter_info::ALTER_DROP_COLUMN;
8423 LEX *lex=Lex;
8424 Alter_drop *ad= new Alter_drop(Alter_drop::FOREIGN_KEY, $4.str);
8427 lex->alter_info.drop_list.push_back(ad);
8428 lex->alter_info.flags|= Alter_info::DROP_FOREIGN_KEY;
8432 LEX *lex=Lex;
8433 Alter_drop *ad= new Alter_drop(Alter_drop::KEY, primary_key_name);
8436 lex->alter_info.drop_list.push_back(ad);
8437 lex->alter_info.flags|= Alter_info::ALTER_DROP_INDEX;
8441 LEX *lex=Lex;
8442 Alter_drop *ad= new Alter_drop(Alter_drop::KEY, $3.str);
8445 lex->alter_info.drop_list.push_back(ad);
8446 lex->alter_info.flags|= Alter_info::ALTER_DROP_INDEX;
8450 LEX *lex=Lex;
8451 lex->alter_info.keys_onoff= Alter_info::DISABLE;
8452 lex->alter_info.flags|= Alter_info::ALTER_KEYS_ONOFF;
8456 LEX *lex=Lex;
8457 lex->alter_info.keys_onoff= Alter_info::ENABLE;
8458 lex->alter_info.flags|= Alter_info::ALTER_KEYS_ONOFF;
8462 LEX *lex=Lex;
8463 Alter_column *ac= new Alter_column($3.str,$6);
8466 lex->alter_info.alter_list.push_back(ac);
8467 lex->alter_info.flags|= Alter_info::ALTER_CHANGE_COLUMN_DEFAULT;
8471 LEX *lex=Lex;
8472 Alter_column *ac= new Alter_column($3.str, (Item*) 0);
8475 lex->alter_info.alter_list.push_back(ac);
8476 lex->alter_info.flags|= Alter_info::ALTER_CHANGE_COLUMN_DEFAULT;
8480 LEX *lex=Lex;
8482 lex->select_lex->db= const_cast<char*>($3->db.str);
8483 if (lex->select_lex->db == NULL &&
8484 lex->copy_db_to(&lex->select_lex->db, &dummy))
8504 lex->name.str= const_cast<char*>($3->table.str);
8505 lex->name.length= $3->table.length;
8506 lex->alter_info.flags|= Alter_info::ALTER_RENAME;
8510 LEX *lex=Lex;
8511 Alter_rename_key *ak= new (YYTHD->mem_root)
8515 lex->alter_info.alter_rename_key_list.push_back(ak);
8516 lex->alter_info.flags|= Alter_info::ALTER_RENAME_INDEX;
8532 LEX *lex= Lex;
8533 lex->create_info.table_charset=
8534 lex->create_info.default_table_charset= $5;
8535 lex->create_info.used_fields|= (HA_CREATE_USED_CHARSET |
8537 lex->alter_info.flags|= Alter_info::ALTER_OPTIONS;
8541 LEX *lex=Lex;
8542 lex->alter_info.flags|= Alter_info::ALTER_OPTIONS;
8543 if ((lex->create_info.used_fields & HA_CREATE_USED_ENGINE) &&
8544 !lex->create_info.db_type)
8546 lex->create_info.used_fields&= ~HA_CREATE_USED_ENGINE;
8555 LEX *lex=Lex;
8556 lex->alter_info.flags|= Alter_info::ALTER_ORDER;
8649 LEX *lex=Lex;
8650 lex->sql_command = SQLCOM_START_GROUP_REPLICATION;
8654 LEX *lex=Lex;
8655 lex->sql_command = SQLCOM_STOP_GROUP_REPLICATION;
8663 LEX *lex=Lex;
8664 lex->sql_command = SQLCOM_SLAVE_STOP;
8665 lex->type = 0;
8666 lex->slave_thd_opt= $3;
8673 LEX *lex=Lex;
8675 lex->slave_connection.reset();
8676 lex->sql_command = SQLCOM_SLAVE_START;
8677 lex->type = 0;
8679 lex->mi.set_unspecified();
8680 lex->slave_thd_opt= $3;
8709 LEX *lex= Lex;
8710 lex->sql_command= SQLCOM_BEGIN;
8718 lex->start_transaction_opt= $3;
8847 LEX *lex= Lex;
8848 lex->mi.slave_until= false;
8852 LEX *lex=Lex;
8853 if (((lex->mi.log_file_name || lex->mi.pos) &&
8854 lex->mi.gtid) ||
8855 ((lex->mi.relay_log_name || lex->mi.relay_log_pos) &&
8856 lex->mi.gtid) ||
8857 !((lex->mi.log_file_name && lex->mi.pos) ||
8858 (lex->mi.relay_log_name && lex->mi.relay_log_pos) ||
8859 lex->mi.gtid ||
8860 lex->mi.until_after_gaps) ||
8863 ((lex->mi.log_file_name || lex->mi.pos || lex->mi.relay_log_name
8864 || lex->mi.relay_log_pos || lex->mi.gtid)
8865 && lex->mi.until_after_gaps))
8871 lex->mi.slave_until= true;
8897 LEX *lex=Lex;
8898 lex->sql_command = SQLCOM_CHECKSUM;
8915 LEX *lex=Lex;
8916 lex->sql_command = SQLCOM_REPAIR;
8917 lex->no_write_to_binlog= $2;
8918 lex->check_opt.init();
8919 lex->alter_info.reset();
8926 LEX* lex= thd->lex;
8927 assert(!lex->m_sql_cmd);
8928 lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_repair_table();
8929 if (lex->m_sql_cmd == NULL)
8953 LEX *lex=Lex;
8954 lex->sql_command = SQLCOM_ANALYZE;
8955 lex->no_write_to_binlog= $2;
8956 lex->check_opt.init();
8957 lex->alter_info.reset();
8964 LEX* lex= thd->lex;
8965 assert(!lex->m_sql_cmd);
8966 lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_analyze_table();
8967 if (lex->m_sql_cmd == NULL)
8983 LEX *lex=Lex;
8985 if (lex->sphead)
8990 lex->sql_command = SQLCOM_CHECK;
8991 lex->check_opt.init();
8992 lex->alter_info.reset();
8999 LEX* lex= thd->lex;
9000 assert(!lex->m_sql_cmd);
9001 lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_check_table();
9002 if (lex->m_sql_cmd == NULL)
9029 LEX *lex=Lex;
9030 lex->sql_command = SQLCOM_OPTIMIZE;
9031 lex->no_write_to_binlog= $2;
9032 lex->check_opt.init();
9033 lex->alter_info.reset();
9040 LEX* lex= thd->lex;
9041 assert(!lex->m_sql_cmd);
9042 lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_optimize_table();
9043 if (lex->m_sql_cmd == NULL)
9088 LEX *lex=Lex;
9090 if (!sl->add_table_to_list(lex->thd, $1,NULL,TL_OPTION_UPDATING,
9092 !sl->add_table_to_list(lex->thd, $3,NULL,TL_OPTION_UPDATING,
9105 LEX *lex=Lex;
9106 lex->sql_command= SQLCOM_ASSIGN_TO_KEYCACHE;
9107 lex->ident= $6;
9149 LEX *lex=Lex;
9150 lex->sql_command=SQLCOM_PRELOAD_KEYS;
9151 lex->alter_info.reset();
10200 All the new functions implemented for new features should fit into
10306 $$= new Item_sum_count(@$, $4);
10389 $$= new (YYTHD->mem_root) String(",", 1, &my_charset_latin1);
10575 $$= new List<Item>;
10716 a new rule for partition_list.
10880 $$= new (YYTHD->mem_root) List<Index_hint>;
10881 Index_hint *hint= new (YYTHD->mem_root) Index_hint(NULL, 0);
10891 $$= new (YYTHD->mem_root) Index_hint($1.str, $1.length);
10897 $$= new (YYTHD->mem_root) Index_hint(STRING_WITH_LEN("PRIMARY"));
10906 $$= new (YYTHD->mem_root) List<Index_hint>;
10920 if (!($$= new List<String>))
10922 String *s= new (YYTHD->mem_root) String((const char *) $1.str,
10931 String *s= new (YYTHD->mem_root) String((const char *) $3.str,
11000 $$= new PTI_context<CTX_WHERE>(@$, $2);
11008 $$= new PTI_context<CTX_HAVING>(@$, $2);
11360 LEX *lex=Lex;
11361 lex->sql_command = SQLCOM_DROP_TABLE;
11362 lex->drop_temporary= $2;
11363 lex->drop_if_exists= $4;
11371 LEX *lex=Lex;
11372 Alter_drop *ad= new Alter_drop(Alter_drop::KEY, $3.str);
11375 lex->sql_command= SQLCOM_DROP_INDEX;
11376 lex->alter_info.reset();
11377 lex->alter_info.flags= Alter_info::ALTER_DROP_INDEX;
11378 lex->alter_info.drop_list.push_back(ad);
11379 if (!lex->current_select()->add_table_to_list(lex->thd, $5, NULL,
11388 LEX *lex=Lex;
11389 lex->sql_command= SQLCOM_DROP_DB;
11390 lex->drop_if_exists=$3;
11391 lex->name= $4;
11396 LEX *lex= thd->lex;
11403 if (lex->sphead)
11408 lex->sql_command = SQLCOM_DROP_FUNCTION;
11409 lex->drop_if_exists= $3;
11410 spname= new sp_name(to_lex_cstring($4), $6, true);
11414 lex->spname= spname;
11428 LEX *lex= thd->lex;
11431 if (lex->sphead)
11436 if (thd->db().str && lex->copy_db_to(&db.str, &db.length))
11440 lex->sql_command = SQLCOM_DROP_FUNCTION;
11441 lex->drop_if_exists= $3;
11442 spname= new sp_name(to_lex_cstring(db), $4, false);
11446 lex->spname= spname;
11450 LEX *lex=Lex;
11451 if (lex->sphead)
11456 lex->sql_command = SQLCOM_DROP_PROCEDURE;
11457 lex->drop_if_exists= $3;
11458 lex->spname= $4;
11462 LEX *lex=Lex;
11463 lex->sql_command= SQLCOM_DROP_USER;
11464 lex->drop_if_exists= $3;
11468 LEX *lex= Lex;
11469 lex->sql_command= SQLCOM_DROP_VIEW;
11470 lex->drop_if_exists= $3;
11484 LEX *lex= Lex;
11485 lex->sql_command= SQLCOM_DROP_TRIGGER;
11486 lex->drop_if_exists= $3;
11487 lex->spname= $4;
11491 LEX *lex= Lex;
11492 lex->alter_tablespace_info->ts_cmd_type= DROP_TABLESPACE;
11496 LEX *lex= Lex;
11497 lex->alter_tablespace_info->ts_cmd_type= DROP_LOGFILE_GROUP;
11503 new (YYTHD->mem_root) Sql_cmd_drop_server($4, $3);
11569 ** Insert : add new data to table
11949 LEX* lex= Lex;
11950 lex->sql_command= SQLCOM_TRUNCATE;
11951 lex->alter_info.reset();
11958 LEX* lex= thd->lex;
11959 assert(!lex->m_sql_cmd);
11960 lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_truncate_table();
11961 if (lex->m_sql_cmd == NULL)
12037 LEX *lex=Lex;
12038 new (&lex->create_info) HA_CREATE_INFO;
12046 LEX *lex= Lex;
12047 lex->sql_command= SQLCOM_SHOW_DATABASES;
12048 if (prepare_schema_table(YYTHD, lex, 0, SCH_SCHEMATA))
12053 LEX *lex= Lex;
12054 lex->sql_command= SQLCOM_SHOW_TABLES;
12055 lex->select_lex->db= $3;
12056 if (prepare_schema_table(YYTHD, lex, 0, SCH_TABLE_NAMES))
12061 LEX *lex= Lex;
12062 lex->sql_command= SQLCOM_SHOW_TRIGGERS;
12063 lex->select_lex->db= $3;
12064 if (prepare_schema_table(YYTHD, lex, 0, SCH_TRIGGERS))
12069 LEX *lex= Lex;
12070 lex->sql_command= SQLCOM_SHOW_EVENTS;
12071 lex->select_lex->db= $2;
12072 if (prepare_schema_table(YYTHD, lex, 0, SCH_EVENTS))
12077 LEX *lex= Lex;
12078 lex->sql_command= SQLCOM_SHOW_TABLE_STATUS;
12079 lex->select_lex->db= $3;
12080 if (prepare_schema_table(YYTHD, lex, 0, SCH_TABLES))
12085 LEX *lex= Lex;
12086 lex->sql_command= SQLCOM_SHOW_OPEN_TABLES;
12087 lex->select_lex->db= $3;
12088 if (prepare_schema_table(YYTHD, lex, 0, SCH_OPEN_TABLES))
12093 LEX *lex= Lex;
12094 lex->sql_command= SQLCOM_SHOW_PLUGINS;
12095 if (prepare_schema_table(YYTHD, lex, 0, SCH_PLUGINS))
12104 LEX *lex= Lex;
12105 lex->sql_command= SQLCOM_SHOW_FIELDS;
12108 if (prepare_schema_table(YYTHD, lex, $4, SCH_COLUMNS))
12121 LEX *lex= Lex;
12122 lex->sql_command= SQLCOM_SHOW_BINLOG_EVENTS;
12131 LEX *lex= Lex;
12132 lex->sql_command= SQLCOM_SHOW_RELAYLOG_EVENTS;
12149 LEX *lex= Lex;
12150 lex->sql_command= SQLCOM_SHOW_KEYS;
12153 if (prepare_schema_table(YYTHD, lex, $3, SCH_STATISTICS))
12158 LEX *lex=Lex;
12159 lex->sql_command= SQLCOM_SHOW_STORAGE_ENGINES;
12160 if (prepare_schema_table(YYTHD, lex, 0, SCH_ENGINES))
12165 LEX *lex=Lex;
12166 lex->sql_command= SQLCOM_SHOW_PRIVILEGES;
12209 LEX *lex= Lex;
12210 lex->sql_command= SQLCOM_SHOW_PROFILE;
12211 if (prepare_schema_table(YYTHD, lex, NULL, SCH_PROFILES) != 0)
12217 LEX *lex= thd->lex;
12221 lex->sql_command= SQLCOM_SHOW_STATUS;
12222 lex->option_type= $1;
12223 if (prepare_schema_table(YYTHD, lex, 0, SCH_STATUS))
12234 if (build_show_session_status(@$, thd, lex->wild, where_cond) == NULL)
12240 if (build_show_global_status(@$, thd, lex->wild, where_cond) == NULL)
12250 LEX *lex= thd->lex;
12254 lex->sql_command= SQLCOM_SHOW_VARIABLES;
12255 lex->option_type= $1;
12256 if (prepare_schema_table(YYTHD, lex, 0, SCH_VARIABLES))
12267 if (build_show_session_variables(@$, thd, lex->wild, where_cond) == NULL)
12273 if (build_show_global_variables(@$, thd, lex->wild, where_cond) == NULL)
12280 LEX *lex= Lex;
12281 lex->sql_command= SQLCOM_SHOW_CHARSETS;
12282 if (prepare_schema_table(YYTHD, lex, 0, SCH_CHARSETS))
12287 LEX *lex= Lex;
12288 lex->sql_command= SQLCOM_SHOW_COLLATIONS;
12289 if (prepare_schema_table(YYTHD, lex, 0, SCH_COLLATIONS))
12294 LEX *lex=Lex;
12295 lex->sql_command= SQLCOM_SHOW_GRANTS;
12297 if (!(curr_user= (LEX_USER*) lex->thd->alloc(sizeof(st_lex_user))))
12300 lex->grant_user= curr_user;
12304 LEX *lex=Lex;
12305 lex->sql_command= SQLCOM_SHOW_GRANTS;
12306 lex->grant_user=$3;
12307 lex->grant_user->auth= NULL_CSTR;
12317 LEX *lex= Lex;
12318 lex->sql_command = SQLCOM_SHOW_CREATE;
12319 if (!lex->select_lex->add_table_to_list(YYTHD, $3, NULL,0))
12321 lex->only_view= 0;
12322 lex->create_info.storage_media= HA_SM_DEFAULT;
12326 LEX *lex= Lex;
12327 lex->sql_command = SQLCOM_SHOW_CREATE;
12328 if (!lex->select_lex->add_table_to_list(YYTHD, $3, NULL, 0))
12330 lex->only_view= 1;
12342 LEX *lex= Lex;
12344 if (prepare_schema_table(YYTHD, lex, 0, SCH_CLIENT_STATS))
12349 LEX *lex= Lex;
12350 lex->sql_command= SQLCOM_SHOW_USER_STATS;
12351 if (prepare_schema_table(YYTHD, lex, 0, SCH_USER_STATS))
12356 LEX *lex= Lex;
12358 if (prepare_schema_table(YYTHD, lex, 0, SCH_THREAD_STATS))
12363 LEX *lex= Lex;
12364 lex->sql_command= SQLCOM_SHOW_TABLE_STATS;
12365 if (prepare_schema_table(YYTHD, lex, 0, SCH_TABLE_STATS))
12370 LEX *lex= Lex;
12371 lex->sql_command= SQLCOM_SHOW_INDEX_STATS;
12372 if (prepare_schema_table(YYTHD, lex, 0, SCH_INDEX_STATS))
12377 LEX *lex= Lex;
12379 lex->sql_command = SQLCOM_SHOW_CREATE_PROC;
12380 lex->spname= $3;
12384 LEX *lex= Lex;
12386 lex->sql_command = SQLCOM_SHOW_CREATE_FUNC;
12387 lex->spname= $3;
12391 LEX *lex= Lex;
12392 lex->sql_command= SQLCOM_SHOW_CREATE_TRIGGER;
12393 lex->spname= $3;
12397 LEX *lex= Lex;
12398 lex->sql_command= SQLCOM_SHOW_STATUS_PROC;
12399 if (prepare_schema_table(YYTHD, lex, 0, SCH_PROCEDURES))
12404 LEX *lex= Lex;
12405 lex->sql_command= SQLCOM_SHOW_STATUS_FUNC;
12406 if (prepare_schema_table(YYTHD, lex, 0, SCH_PROCEDURES))
12426 LEX *lex=Lex;
12427 lex->sql_command= SQLCOM_SHOW_CREATE_USER;
12428 lex->grant_user=$4;
12480 Lex->wild= new (YYTHD->mem_root) String($2.str, $2.length,
12499 Lex->wild= new (YYTHD->mem_root) String($2.str, $2.length,
12533 LEX *lex= Lex;
12534 lex->current_select()->parsing_place= CTX_SELECT_LIST;
12535 lex->sql_command= SQLCOM_SHOW_FIELDS;
12536 lex->select_lex->db= NULL;
12537 lex->verbose= 0;
12538 if (prepare_schema_table(YYTHD, lex, $2, SCH_COLUMNS))
12581 if ((Lex->explain_format= new Explain_format_traditional) == NULL)
12586 if ((Lex->explain_format= new Explain_format_traditional) == NULL)
12592 if ((Lex->explain_format= new Explain_format_traditional) == NULL)
12600 if ((Lex->explain_format= new Explain_format_JSON) == NULL)
12605 if ((Lex->explain_format= new Explain_format_traditional) == NULL)
12621 Lex->wild= new (YYTHD->mem_root) String((const char*) $1.str,
12635 LEX *lex=Lex;
12636 lex->sql_command= SQLCOM_FLUSH;
12637 lex->type= 0;
12638 lex->no_write_to_binlog= $2;
12754 LEX *lex=Lex;
12755 lex->sql_command= SQLCOM_RESET; lex->type=0;
12787 LEX *lex=Lex;
12788 lex->type=0;
12789 lex->sql_command = SQLCOM_PURGE;
12799 LEX *lex= Lex;
12800 lex->purge_value_list.empty();
12801 lex->purge_value_list.push_front(new Item_uint($3));
12802 lex->type= PURGE_BITMAPS_TO_LSN;
12815 LEX *lex= Lex;
12816 lex->purge_value_list.empty();
12817 lex->purge_value_list.push_front($2);
12818 lex->sql_command= SQLCOM_PURGE_BEFORE;
12829 LEX *lex=Lex;
12830 lex->kill_value_list.empty();
12831 lex->kill_value_list.push_front($3);
12832 lex->sql_command= SQLCOM_KILL;
12847 LEX *lex=Lex;
12848 lex->sql_command=SQLCOM_CHANGE_DB;
12849 lex->select_lex->db= $2.str;
12859 LEX *lex= thd->lex;
12861 if (lex->sphead)
12870 LEX *lex=Lex;
12871 lex->sql_command= SQLCOM_LOAD;
12872 lex->local_file= $5;
12873 lex->duplicates= DUP_ERROR;
12874 lex->set_ignore(false);
12875 if (!(lex->exchange= new sql_exchange($7.str, 0, $2)))
12880 LEX *lex=Lex;
12882 if (lex->duplicates == DUP_REPLACE && $4 == TL_WRITE_CONCURRENT_INSERT)
12889 lex->load_field_list.empty();
12890 lex->load_update_list.empty();
12891 lex->load_value_list.empty();
12893 if (lex->local_file && lex->duplicates == DUP_ERROR)
12894 lex->set_ignore(true);
13031 $$= new (YYTHD->mem_root) Item_user_var_as_out_param($2);
13053 LEX *lex= Lex;
13055 String *val= new (YYTHD->mem_root) String(@2.cpp.start,
13060 if (lex->load_update_list.push_back($1) ||
13061 lex->load_value_list.push_back($3) ||
13062 lex->load_set_str_list.push_back(val))
13096 $$= new (YYTHD->mem_root) String($1.str,
13105 $$= new (YYTHD->mem_root) String(s.str, s.length, &my_charset_bin);
13112 $$= new (YYTHD->mem_root) String(s.str, s.length, &my_charset_bin);
13379 $$= new Table_ident(YYTHD, db, to_lex_cstring($1), 0);
14427 LEX *lex= Lex;
14428 if (lex->sphead)
14433 lex->sql_command = SQLCOM_HA_OPEN;
14434 if (!lex->current_select()->add_table_to_list(thd, $2, $4, 0))
14436 lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_handler_open();
14437 if (lex->m_sql_cmd == NULL)
14443 LEX *lex= Lex;
14444 if (lex->sphead)
14449 lex->sql_command = SQLCOM_HA_CLOSE;
14450 if (!lex->current_select()->add_table_to_list(thd, $2, 0, 0))
14452 lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_handler_close();
14453 if (lex->m_sql_cmd == NULL)
14460 LEX *lex=Lex;
14461 if (lex->sphead)
14466 lex->expr_allows_subselect= FALSE;
14467 lex->sql_command = SQLCOM_HA_READ;
14468 Item *one= new (YYTHD->mem_root) Item_int((int32) 1);
14471 lex->current_select()->select_limit= one;
14472 lex->current_select()->offset_limit= 0;
14473 if (!lex->current_select()->add_table_to_list(lex->thd, $2, 0, 0))
14488 LEX *lex= Lex;
14491 if (lex->uses_stored_routines())
14497 lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_handler_read($5,
14498 lex->ident.str, lex->handler_insert_list,
14500 if (lex->m_sql_cmd == NULL)
14550 LEX *lex= Lex;
14551 lex->type= 0;
14555 LEX *lex= Lex;
14556 if (lex->columns.elements)
14561 lex->type= TYPE_ENUM_FUNCTION;
14565 LEX *lex= Lex;
14566 if (lex->columns.elements)
14571 lex->type= TYPE_ENUM_PROCEDURE;
14579 LEX *lex= Lex;
14580 lex->users_list.push_front ($3);
14581 lex->type= TYPE_ENUM_PROXY;
14594 LEX *lex= Lex;
14595 lex->type= 0;
14600 LEX *lex= Lex;
14601 if (lex->columns.elements)
14606 lex->type= TYPE_ENUM_FUNCTION;
14611 LEX *lex= Lex;
14612 if (lex->columns.elements)
14617 lex->type= TYPE_ENUM_PROCEDURE;
14621 LEX *lex= Lex;
14622 lex->users_list.push_front ($3);
14623 lex->type= TYPE_ENUM_PROXY;
14635 LEX *lex= Lex;
14636 if (lex->grant == GLOBAL_ACLS &&
14637 lex->sql_command == SQLCOM_REVOKE)
14638 lex->sql_command= SQLCOM_REVOKE_ALL;
14711 LEX *lex=Lex;
14712 if (lex->x509_subject)
14717 lex->x509_subject=$2.str;
14721 LEX *lex=Lex;
14722 if (lex->x509_issuer)
14727 lex->x509_issuer=$2.str;
14731 LEX *lex=Lex;
14732 if (lex->ssl_cipher)
14737 lex->ssl_cipher=$2.str;
14744 LEX *lex= Lex;
14746 if (lex->copy_db_to(&lex->current_select()->db, &dummy))
14748 if (lex->grant == GLOBAL_ACLS)
14749 lex->grant = DB_ACLS & ~GRANT_ACL;
14750 else if (lex->columns.elements)
14759 LEX *lex= Lex;
14760 lex->current_select()->db = $1.str;
14761 if (lex->grant == GLOBAL_ACLS)
14762 lex->grant = DB_ACLS & ~GRANT_ACL;
14763 else if (lex->columns.elements)
14772 LEX *lex= Lex;
14773 lex->current_select()->db = NULL;
14774 if (lex->grant == GLOBAL_ACLS)
14775 lex->grant= GLOBAL_ACLS & ~GRANT_ACL;
14776 else if (lex->columns.elements)
14785 LEX *lex=Lex;
14786 if (!lex->current_select()->add_table_to_list(lex->thd, $1,NULL,
14789 if (lex->grant == GLOBAL_ACLS)
14790 lex->grant = TABLE_ACLS & ~GRANT_ACL;
14883 LEX *lex=Lex;
14884 lex->grant |= lex->which_columns;
14897 …String *new_str = new (YYTHD->mem_root) String((const char*) $1.str,$1.length,system_charset_info);
14902 LEX *lex=Lex;
14909 lex->grant_tot_col|= lex->which_columns;
14911 point->rights |= lex->which_columns;
14914 LEX_COLUMN *col= new LEX_COLUMN (*new_str,lex->which_columns);
14917 lex->columns.push_back(col);
14961 LEX *lex=Lex;
14962 lex->mqh.questions=$2;
14963 lex->mqh.specified_limits|= USER_RESOURCES::QUERIES_PER_HOUR;
14967 LEX *lex=Lex;
14968 lex->mqh.updates=$2;
14969 lex->mqh.specified_limits|= USER_RESOURCES::UPDATES_PER_HOUR;
14973 LEX *lex=Lex;
14974 lex->mqh.conn_per_hour= $2;
14975 lex->mqh.specified_limits|= USER_RESOURCES::CONNECTIONS_PER_HOUR;
14979 LEX *lex=Lex;
14980 lex->mqh.user_conn= $2;
14981 lex->mqh.specified_limits|= USER_RESOURCES::USER_CONNECTIONS;
14988 LEX *lex=Lex;
14989 lex->sql_command = SQLCOM_BEGIN;
14990 lex->start_transaction_opt= 0;
15022 LEX *lex=Lex;
15023 lex->sql_command= SQLCOM_COMMIT;
15026 lex->tx_chain= $3;
15027 lex->tx_release= $4;
15034 LEX *lex=Lex;
15035 lex->sql_command= SQLCOM_ROLLBACK;
15038 lex->tx_chain= $3;
15039 lex->tx_release= $4;
15044 LEX *lex=Lex;
15045 lex->sql_command= SQLCOM_ROLLBACK_TO_SAVEPOINT;
15046 lex->ident= $5;
15053 LEX *lex=Lex;
15054 lex->sql_command= SQLCOM_SAVEPOINT;
15055 lex->ident= $2;
15062 LEX *lex=Lex;
15063 lex->sql_command= SQLCOM_RELEASE_SAVEPOINT;
15064 lex->ident= $3;
15228 YYTHD->lex->definer= 0;
15235 YYTHD->lex->definer= get_current_user(YYTHD, $3);
15281 LEX *lex= thd->lex;
15282 lex->sql_command= SQLCOM_CREATE_VIEW;
15284 if (!lex->select_lex->add_table_to_list(thd, $3, NULL,
15289 lex->query_tables->open_strategy= TABLE_LIST::OPEN_STUB;
15315 LEX *lex= Lex;
15316 lex->parsing_options.allows_variable= FALSE;
15317 lex->parsing_options.allows_select_into= FALSE;
15318 lex->parsing_options.allows_select_procedure= FALSE;
15323 LEX *lex= Lex;
15325 lex->create_view_select.str= const_cast<char *>(@2.cpp.start);
15326 size_t len= @3.cpp.end - lex->create_view_select.str;
15327 void *create_view_select= thd->memdup(lex->create_view_select.str, len);
15328 lex->create_view_select.length= len;
15329 lex->create_view_select.str= (char *) create_view_select;
15330 trim_whitespace(thd->charset(), &lex->create_view_select);
15331 lex->parsing_options.allows_variable= TRUE;
15332 lex->parsing_options.allows_select_into= TRUE;
15333 lex->parsing_options.allows_select_procedure= TRUE;
15443 LEX *lex= thd->lex;
15445 if (lex->sphead)
15451 lex->raw_trg_on_table_name_begin= @5.raw.start;
15452 lex->raw_trg_on_table_name_end= @7.raw.start;
15459 lex->trg_ordering_clause_begin= NULL;
15460 lex->trg_ordering_clause_end= NULL;
15464 lex->trg_ordering_clause_begin= @10.cpp.start;
15465 lex->trg_ordering_clause_end= @10.cpp.end;
15478 lex->stmt_definition_begin= @1.cpp.start;
15479 lex->ident.str= const_cast<char *>(@6.cpp.start);
15480 lex->ident.length= @8.cpp.start - @6.cpp.start;
15482 lex->sphead= sp;
15483 lex->spname= $2;
15485 memset(&lex->sp_chistics, 0, sizeof(st_sp_chistics));
15486 sp->m_chistics= &lex->sp_chistics;
15493 LEX *lex= Lex;
15494 sp_head *sp= lex->sphead;
15498 lex->sql_command= SQLCOM_CREATE_TRIGGER;
15506 lex->query_tables can be wiped out.
15508 if (!lex->select_lex->add_table_to_list(thd, $6,
15528 LEX *lex= thd->lex;
15535 lex->sql_command = SQLCOM_CREATE_FUNCTION;
15536 lex->udf.type= UDFTYPE_AGGREGATE;
15537 lex->stmt_definition_begin= @2.cpp.start;
15538 lex->udf.name = $3;
15539 lex->udf.returns=(Item_result) $5;
15540 lex->udf.dl=$7.str;
15546 LEX *lex= thd->lex;
15553 lex->sql_command = SQLCOM_CREATE_FUNCTION;
15554 lex->udf.type= UDFTYPE_FUNCTION;
15555 lex->stmt_definition_begin= @1.cpp.start;
15556 lex->udf.name = $2;
15557 lex->udf.returns=(Item_result) $4;
15558 lex->udf.dl=$6.str;
15568 LEX *lex= thd->lex;
15570 lex->stmt_definition_begin= @1.cpp.start;
15571 lex->spname= $2;
15573 if (lex->sphead)
15579 sp_head *sp= sp_start_parsing(thd, SP_TYPE_FUNCTION, lex->spname);
15584 lex->sphead= sp;
15595 LEX *lex= Lex;
15596 lex->charset= NULL;
15597 lex->length= lex->dec= NULL;
15598 lex->interval_list.empty();
15599 lex->type= 0;
15600 lex->gcol_info= 0;
15604 LEX *lex= Lex;
15605 sp_head *sp= lex->sphead;
15612 && (lex->type & BINCMP_FLAG))
15623 memset(&lex->sp_chistics, 0, sizeof(st_sp_chistics));
15628 LEX *lex= thd->lex;
15630 lex->sphead->m_chistics= &lex->sp_chistics;
15631 lex->sphead->set_body_start(thd, yylloc.cpp.start);
15636 LEX *lex= thd->lex;
15637 sp_head *sp= lex->sphead;
15644 lex->sql_command= SQLCOM_CREATE_SPFUNCTION;
15662 - MySQL 5.{N+1} defines a new native function 'foo', as
15663 part of a new feature.
15695 LEX *lex= Lex;
15697 if (lex->sphead)
15703 lex->stmt_definition_begin= @2.cpp.start;
15710 lex->sphead= sp;
15720 LEX *lex= thd->lex;
15722 lex->sphead->m_parser_data.set_parameter_end_ptr(@7.cpp.start);
15723 memset(&lex->sp_chistics, 0, sizeof(st_sp_chistics));
15728 LEX *lex= thd->lex;
15730 lex->sphead->m_chistics= &lex->sp_chistics;
15731 lex->sphead->set_body_start(thd, yylloc.cpp.start);
15736 LEX *lex= Lex;
15740 lex->sql_command= SQLCOM_CREATE_PROCEDURE;
15750 Lex->m_sql_cmd= new (YYTHD->mem_root) Sql_cmd_xa_start($3, $4);
15755 Lex->m_sql_cmd= new (YYTHD->mem_root) Sql_cmd_xa_end($3, $4);
15760 Lex->m_sql_cmd= new (YYTHD->mem_root) Sql_cmd_xa_prepare($3);
15765 Lex->m_sql_cmd= new (YYTHD->mem_root) Sql_cmd_xa_commit($3, $4);
15770 Lex->m_sql_cmd= new (YYTHD->mem_root) Sql_cmd_xa_rollback($3);
15775 Lex->m_sql_cmd= new (YYTHD->mem_root) Sql_cmd_xa_recover($3);
15848 LEX *lex= Lex;
15849 lex->sql_command= SQLCOM_INSTALL_PLUGIN;
15850 lex->m_sql_cmd= new Sql_cmd_install_plugin($3, $5);
15857 LEX *lex= Lex;
15858 lex->sql_command= SQLCOM_UNINSTALL_PLUGIN;
15859 lex->m_sql_cmd= new Sql_cmd_uninstall_plugin($3);