Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-in-4.1
This commit is contained in:
commit
fa46807825
@ -1655,6 +1655,34 @@ int set_var_password::update(THD *thd)
|
|||||||
1 : 0);
|
1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
Functions to handle SET NAMES and SET CHARACTER SET
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
int set_var_client_collation::check(THD *thd)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int set_var_client_collation::update(THD *thd)
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
if (var->type == OPT_GLOBAL)
|
||||||
|
global_system_variables.thd_charset= var->save_result.charset;
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
thd->variables.thd_charset= client_collation;
|
||||||
|
thd->variables.convert_result_charset= convert_result_charset;
|
||||||
|
thd->protocol_simple.init(thd);
|
||||||
|
thd->protocol_prep.init(thd);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Used templates
|
Used templates
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -526,6 +526,21 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/* For SET NAMES and SET CHARACTER SET */
|
||||||
|
|
||||||
|
class set_var_client_collation: public set_var_base
|
||||||
|
{
|
||||||
|
CHARSET_INFO *client_collation;
|
||||||
|
my_bool convert_result_charset;
|
||||||
|
public:
|
||||||
|
set_var_client_collation(CHARSET_INFO *coll_arg ,my_bool conv_arg)
|
||||||
|
:client_collation(coll_arg), convert_result_charset(conv_arg)
|
||||||
|
{}
|
||||||
|
int check(THD *thd);
|
||||||
|
int update(THD *thd);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Prototypes for helper functions
|
Prototypes for helper functions
|
||||||
*/
|
*/
|
||||||
|
@ -4409,19 +4409,13 @@ option_value:
|
|||||||
cl->name,cs->csname);
|
cl->name,cs->csname);
|
||||||
YYABORT;
|
YYABORT;
|
||||||
}
|
}
|
||||||
Item_string *csname= new Item_string(cl->name,
|
lex->var_list.push_back(new set_var_client_collation(cl,1));
|
||||||
strlen(cl->name),
|
|
||||||
&my_charset_latin1);
|
|
||||||
lex->var_list.push_back(new set_var(lex->option_type,
|
|
||||||
find_sys_var("client_collation"),
|
|
||||||
csname));
|
|
||||||
}
|
}
|
||||||
| COLLATION_SYM collation_name_or_default
|
| COLLATION_SYM collation_name_or_default
|
||||||
{
|
{
|
||||||
THD* thd= YYTHD;
|
THD* thd= YYTHD;
|
||||||
LEX *lex= &thd->lex;
|
LEX *lex= &thd->lex;
|
||||||
system_variables *vars= &thd->variables;
|
CHARSET_INFO *cs= thd->variables.thd_charset;
|
||||||
CHARSET_INFO *cs= vars->thd_charset;
|
|
||||||
CHARSET_INFO *cl= $2;
|
CHARSET_INFO *cl= $2;
|
||||||
|
|
||||||
if (!cl)
|
if (!cl)
|
||||||
@ -4438,12 +4432,7 @@ option_value:
|
|||||||
cl->name,cs->csname);
|
cl->name,cs->csname);
|
||||||
YYABORT;
|
YYABORT;
|
||||||
}
|
}
|
||||||
Item_string *csname= new Item_string(cl->name,
|
lex->var_list.push_back(new set_var_client_collation(cl,1));
|
||||||
strlen(cl->name),
|
|
||||||
&my_charset_latin1);
|
|
||||||
lex->var_list.push_back(new set_var(lex->option_type,
|
|
||||||
find_sys_var("client_collation"),
|
|
||||||
csname));
|
|
||||||
}
|
}
|
||||||
| PASSWORD equal text_or_password
|
| PASSWORD equal text_or_password
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user