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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
4ee94d21
Commit
4ee94d21
authored
Jul 30, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Database name and national characters fixes.
parent
180b101f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
4 deletions
+40
-4
mysql-test/r/ctype_recoding.result
mysql-test/r/ctype_recoding.result
+14
-0
mysql-test/t/ctype_recoding.test
mysql-test/t/ctype_recoding.test
+11
-0
sql/sql_parse.cc
sql/sql_parse.cc
+15
-4
No files found.
mysql-test/r/ctype_recoding.result
View file @
4ee94d21
...
...
@@ -42,3 +42,17 @@ Field Type Null Key Default Extra
SET CHARACTER SET koi8r;
DROP TABLE ;
SET CHARACTER SET default;
SET CHARACTER SET koi8r;
CREATE DATABASE ;
USE ;
SHOW TABLES;
Tables_in_
SHOW TABLES IN ;
Tables_in_
SET CHARACTER SET cp1251;
SHOW TABLES;
Tables_in_
SHOW TABLES IN ;
Tables_in_
SET CHARACTER SET koi8r;
DROP DATABASE ;
mysql-test/t/ctype_recoding.test
View file @
4ee94d21
...
...
@@ -27,3 +27,14 @@ SHOW FIELDS FROM таблица;
SET
CHARACTER
SET
koi8r
;
DROP
TABLE
;
SET
CHARACTER
SET
default
;
SET
CHARACTER
SET
koi8r
;
CREATE
DATABASE
;
USE
;
SHOW
TABLES
;
SHOW
TABLES
IN
;
SET
CHARACTER
SET
cp1251
;
SHOW
TABLES
;
SHOW
TABLES
IN
;
SET
CHARACTER
SET
koi8r
;
DROP
DATABASE
;
sql/sql_parse.cc
View file @
4ee94d21
...
...
@@ -549,6 +549,7 @@ check_connections(THD *thd)
char
*
end
,
*
user
,
*
passwd
,
*
db
;
char
prepared_scramble
[
SCRAMBLE41_LENGTH
+
4
];
/* Buffer for scramble&hash */
ACL_USER
*
cached_user
=
NULL
;
/* Initialise to NULL for first stage */
String
convdb
;
DBUG_PRINT
(
"info"
,(
"New connection received on %s"
,
vio_description
(
net
->
vio
)));
...
...
@@ -724,7 +725,12 @@ check_connections(THD *thd)
db
=
0
;
using_password
=
test
(
passwd
[
0
]);
if
(
thd
->
client_capabilities
&
CLIENT_CONNECT_WITH_DB
)
{
db
=
strend
(
passwd
)
+
1
;
convdb
.
copy
(
db
,
strlen
(
db
),
thd
->
variables
.
character_set_client
,
system_charset_info
);
db
=
convdb
.
c_ptr
();
}
/* We can get only old hash at this point */
if
(
using_password
&&
strlen
(
passwd
)
!=
SCRAMBLE_LENGTH
)
...
...
@@ -1125,10 +1131,15 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
thd
->
lex
.
select_lex
.
options
=
0
;
// We store status here
switch
(
command
)
{
case
COM_INIT_DB
:
statistic_increment
(
com_stat
[
SQLCOM_CHANGE_DB
],
&
LOCK_status
);
if
(
!
mysql_change_db
(
thd
,
packet
))
mysql_log
.
write
(
thd
,
command
,
"%s"
,
thd
->
db
);
break
;
{
String
convname
;
statistic_increment
(
com_stat
[
SQLCOM_CHANGE_DB
],
&
LOCK_status
);
convname
.
copy
(
packet
,
strlen
(
packet
),
thd
->
variables
.
character_set_client
,
system_charset_info
);
if
(
!
mysql_change_db
(
thd
,
convname
.
c_ptr
()))
mysql_log
.
write
(
thd
,
command
,
"%s"
,
thd
->
db
);
break
;
}
#ifndef EMBEDDED_LIBRARY
case
COM_REGISTER_SLAVE
:
{
...
...
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