Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
e4a5ddd1
Commit
e4a5ddd1
authored
Jul 06, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug#4417 binary character set breaks multi-byte table/field name.
parent
3e4084ae
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
6 deletions
+52
-6
mysql-test/r/ctype_recoding.result
mysql-test/r/ctype_recoding.result
+25
-0
mysql-test/t/ctype_recoding.test
mysql-test/t/ctype_recoding.test
+19
-0
sql/sql_class.cc
sql/sql_class.cc
+8
-6
No files found.
mysql-test/r/ctype_recoding.result
View file @
e4a5ddd1
...
...
@@ -111,3 +111,28 @@ SET character_set_connection=cp1251;
SELECT hex('');
hex('')
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
тест
mysql-test/t/ctype_recoding.test
View file @
e4a5ddd1
...
...
@@ -78,3 +78,22 @@ SET NAMES koi8r;
SELECT
hex
(
''
);
SET
character_set_connection
=
cp1251
;
SELECT
hex
(
''
);
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
;
sql/sql_class.cc
View file @
e4a5ddd1
...
...
@@ -533,21 +533,23 @@ bool THD::convert_string(String *s, CHARSET_INFO *from_cs, CHARSET_INFO *to_cs)
return
FALSE
;
}
/*
Update some cache variables when character set changes
*/
void
THD
::
update_charset
()
{
charset_is_system_charset
=
my_charset_same
(
charset
(),
system_charset_info
);
charset_is_collation_connection
=
my_charset_same
(
charset
(),
variables
.
collation_connection
);
uint32
not_used
;
charset_is_system_charset
=
!
String
::
needs_conversion
(
0
,
charset
(),
system_charset_info
,
&
not_used
);
charset_is_collation_connection
=
!
String
::
needs_conversion
(
0
,
charset
(),
variables
.
collation_connection
,
&
not_used
);
}
/* routings to adding tables to list of changed in transaction tables */
inline
static
void
list_include
(
CHANGED_TABLE_LIST
**
prev
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment