SET character_set_connection=newcharset;
  SELECT hex('text');

The above sequence failed in some cases.
This commit is contained in:
unknown 2003-09-16 17:14:23 +05:00
parent 414bd57b33
commit 2e95bcc477
3 changed files with 14 additions and 0 deletions

View file

@ -70,3 +70,11 @@ SHOW TABLES IN
Tables_in_òåñò
SET CHARACTER SET koi8r;
DROP DATABASE ÔÅÓÔ;
SET NAMES koi8r;
SELECT hex('ÔÅÓÔ');
hex('ÔÅÓÔ')
D4C5D3D4
SET character_set_connection=cp1251;
SELECT hex('ÔÅÓÔ');
hex('ÔÅÓÔ')
F2E5F1F2

View file

@ -45,3 +45,8 @@ SHOW TABLES;
SHOW TABLES IN òåñò;
SET CHARACTER SET koi8r;
DROP DATABASE ÔÅÓÔ;
SET NAMES koi8r;
SELECT hex('ÔÅÓÔ');
SET character_set_connection=cp1251;
SELECT hex('ÔÅÓÔ');

View file

@ -1343,6 +1343,7 @@ bool sys_var_character_set::check(THD *thd, set_var *var)
bool sys_var_character_set::update(THD *thd, set_var *var)
{
ci_ptr(thd,var->type)[0]= var->save_result.charset;
thd->update_charset();
return 0;
}