1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug#4417 binary character set breaks multi-byte table/field name.

This commit is contained in:
bar@mysql.com
2004-07-06 17:15:43 +05:00
parent 434e2e094c
commit 30a86a0be9
3 changed files with 52 additions and 6 deletions

View File

@ -111,3 +111,28 @@ SET character_set_connection=cp1251;
SELECT hex('<27><><EFBFBD><EFBFBD>');
hex('<27><><EFBFBD><EFBFBD>')
F2E5F1F2
USE test;
SET NAMES binary;
CREATE TABLE `тест` (`тест` int);
SHOW CREATE TABLE `тест`;
Table Create Table
тест CREATE TABLE `тест` (
`тест` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SET NAMES utf8;
SHOW CREATE TABLE `тест`;
Table Create Table
тест CREATE TABLE `тест` (
`тест` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE `тест`;
SET NAMES binary;
SET character_set_connection=utf8;
SELECT 'тест' as s;
s
тест
SET NAMES utf8;
SET character_set_connection=binary;
SELECT 'тест' as s;
s
тест

View File

@ -78,3 +78,22 @@ SET NAMES koi8r;
SELECT hex('<27><><EFBFBD><EFBFBD>');
SET character_set_connection=cp1251;
SELECT hex('<27><><EFBFBD><EFBFBD>');
USE test;
# Bug#4417
# Check that identifiers and strings are not converted
# when the client character set is binary.
SET NAMES binary;
CREATE TABLE `тест` (`тест` int);
SHOW CREATE TABLE `тест`;
SET NAMES utf8;
SHOW CREATE TABLE `тест`;
DROP TABLE `тест`;
SET NAMES binary;
SET character_set_connection=utf8;
SELECT 'тест' as s;
SET NAMES utf8;
SET character_set_connection=binary;
SELECT 'тест' as s;