'#--------------------FN_DYNVARS_010_01-------------------------#'
SET @global_character_set_client = @@global.character_set_client;
SET @session_character_set_client = @@session.character_set_client;
SET @@global.character_set_client = utf8;
'connect (con1,localhost,root,,,,)'
'connection con1'
SELECT @@global.character_set_client;
@@global.character_set_client
utf8
SELECT @@session.character_set_client;
@@session.character_set_client
latin1
'#--------------------FN_DYNVARS_010_02-------------------------#'
'connection default'
SHOW VARIABLES like 'character_set_client';
Variable_name	Value
character_set_client	latin1
DROP TABLE IF EXISTS t1;
CREATE TABLE t1(a CHAR(3) character set utf8);
'---verifying character_set_client with a utf8 character----'
'For latin1 characterset';
SET @@session.character_set_client = latin1;
INSERT INTO t1 values('è');
SELECT hex(a),CHAR_LENGTH(a) FROM t1;
hex(a)	CHAR_LENGTH(a)
03C3A8	2
DELETE FROM t1;
'For utf8 characterset';
SET @@session.character_set_client = utf8;
INSERT INTO t1 values('è');
SELECT hex(a),CHAR_LENGTH(a) FROM t1;
hex(a)	CHAR_LENGTH(a)
03	1
DELETE FROM t1;
DROP TABLE IF EXISTS t1;
SET @@global.character_set_client = @global_character_set_client;
SET @@session.character_set_client = @session_character_set_client;
