| 1 |
'#--------------------FN_DYNVARS_011_01-------------------------#' |
| 2 |
SET @global_character_set_connection = @@global.character_set_connection; |
| 3 |
SET @session_character_set_connection = @@session.character_set_connection; |
| 4 |
SET @session_character_set_client = @@session.character_set_client; |
| 5 |
SET @session_character_set_results = @@session.character_set_results; |
| 6 |
SET @@global.character_set_connection = utf8; |
| 7 |
Warnings: |
| 8 |
Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous. |
| 9 |
'connect (con1,localhost,root,,,,)' |
| 10 |
'connection con1' |
| 11 |
SELECT @@global.character_set_connection; |
| 12 |
@@global.character_set_connection |
| 13 |
utf8mb3 |
| 14 |
SELECT @@session.character_set_connection; |
| 15 |
@@session.character_set_connection |
| 16 |
utf8mb3 |
| 17 |
'#--------------------FN_DYNVARS_011_02-------------------------#' |
| 18 |
'connection default' |
| 19 |
DROP TABLE IF EXISTS t1; |
| 20 |
CREATE TABLE t1(b CHAR(40) CHARACTER SET utf8); |
| 21 |
Warnings: |
| 22 |
Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous. |
| 23 |
'--verify that character_set_connection converts character_set_client--' |
| 24 |
SET @@session.character_set_client = utf8; |
| 25 |
Warnings: |
| 26 |
Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous. |
| 27 |
SET @@session.character_set_results = utf8; |
| 28 |
Warnings: |
| 29 |
Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous. |
| 30 |
SET @@session.character_set_connection = latin1; |
| 31 |
SELECT 'ЁЂЃЄ' AS utf_text; |
| 32 |
utf_text |
| 33 |
???? |
| 34 |
Warnings: |
| 35 |
Warning 1300 Cannot convert string '\xD0\x81\xD0\x82\xD0\x83...' from utf8mb3 to latin1 |
| 36 |
SET @@session.character_set_connection = utf8; |
| 37 |
Warnings: |
| 38 |
Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous. |
| 39 |
SELECT 'ЁЂЃЄ' AS utf_text; |
| 40 |
utf_text |
| 41 |
ЁЂЃЄ |
| 42 |
'---now inserting utf8 string with different character_set_connection--' |
| 43 |
SET @@session.character_set_connection = ascii; |
| 44 |
INSERT INTO t1 VALUES('ЁЂЃЄ'); |
| 45 |
Warnings: |
| 46 |
Warning 1300 Cannot convert string '\xD0\x81\xD0\x82\xD0\x83...' from utf8mb3 to ascii |
| 47 |
SELECT * FROM t1; |
| 48 |
b |
| 49 |
???? |
| 50 |
TRUNCATE TABLE t1; |
| 51 |
'--now client & results charset in latin1 & connection charset in ascii-' |
| 52 |
SET @@session.character_set_connection = ascii; |
| 53 |
SET @@session.character_set_client = latin1; |
| 54 |
SET @@session.character_set_results = latin1; |
| 55 |
INSERT INTO t1 VALUES('ЁЂЃЄ'); |
| 56 |
Warnings: |
| 57 |
Warning 1300 Cannot convert string '\xD0\x81\xD0\x82\xD0\x83...' from latin1 to ascii |
| 58 |
SELECT * FROM t1; |
| 59 |
b |
| 60 |
???????? |
| 61 |
TRUNCATE TABLE t1; |
| 62 |
SET NAMES utf8; |
| 63 |
Warnings: |
| 64 |
Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous. |
| 65 |
INSERT INTO t1 VALUES('ЁЂЃЄ'); |
| 66 |
SELECT * FROM t1; |
| 67 |
b |
| 68 |
ЁЂЃЄ |
| 69 |
TRUNCATE TABLE t1; |
| 70 |
SET @@global.character_set_connection = @global_character_set_connection; |
| 71 |
SET @@session.character_set_connection = @session_character_set_connection; |
| 72 |
SET @@session.character_set_client = @session_character_set_client; |
| 73 |
SET @@session.character_set_results = @session_character_set_results; |
| 74 |
DROP TABLE t1; |