| 7645 | */ |
| 7646 | |
| 7647 | void create_select_for_variable(THD *thd, LEX_CSTRING *var_name) |
| 7648 | { |
| 7649 | LEX *lex; |
| 7650 | Item *var; |
| 7651 | char buff[MAX_SYS_VAR_LENGTH*2+4+8], *end; |
| 7652 | DBUG_ENTER("create_select_for_variable"); |
| 7653 | |
| 7654 | lex= thd->lex; |
| 7655 | lex->init_select(); |
| 7656 | lex->sql_command= SQLCOM_SELECT; |
| 7657 | /* |
| 7658 | We set the name of Item to @@session.var_name because that then is used |
| 7659 | as the column name in the output. |
| 7660 | */ |
| 7661 | if ((var= get_system_var(thd, OPT_SESSION, var_name, &null_clex_str))) |
| 7662 | { |
| 7663 | end= strxmov(buff, "@@session.", var_name->str, NullS); |
| 7664 | var->set_name(thd, buff, (uint)(end-buff), system_charset_info); |
| 7665 | add_item_to_list(thd, var); |
| 7666 | } |
| 7667 | DBUG_VOID_RETURN; |
| 7668 | } |
| 7669 | |
| 7670 | |
| 7671 | void mysql_init_delete(LEX *lex) |
nothing calls this directly
no test coverage detected