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
437c9431
Commit
437c9431
authored
Sep 27, 2006
by
gluh@mysql.com/gluh.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/gluh/MySQL/Merge/4.1
into mysql.com:/home/gluh/MySQL/Merge/5.0
parents
3799f32f
a039376c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
46 deletions
+12
-46
include/mysql_com.h
include/mysql_com.h
+0
-3
mysql-test/r/ctype_utf8.result
mysql-test/r/ctype_utf8.result
+0
-13
mysql-test/t/ctype_utf8.test
mysql-test/t/ctype_utf8.test
+0
-17
sql-common/client.c
sql-common/client.c
+3
-3
sql/sql_acl.cc
sql/sql_acl.cc
+5
-4
sql/sql_parse.cc
sql/sql_parse.cc
+2
-2
sql/table.cc
sql/table.cc
+2
-4
No files found.
include/mysql_com.h
View file @
437c9431
...
...
@@ -26,9 +26,6 @@
#define USERNAME_LENGTH 16
#define SERVER_VERSION_LENGTH 60
#define SQLSTATE_LENGTH 5
#define SYSTEM_CHARSET_MBMAXLEN 3
#define NAME_BYTE_LEN NAME_LEN*SYSTEM_CHARSET_MBMAXLEN
#define USERNAME_BYTE_LENGTH USERNAME_LENGTH*SYSTEM_CHARSET_MBMAXLEN
/*
USER_HOST_BUFF_SIZE -- length of string buffer, that is enough to contain
...
...
mysql-test/r/ctype_utf8.result
View file @
437c9431
...
...
@@ -1340,19 +1340,6 @@ select a from t1 group by a;
a
e
drop table t1;
set names utf8;
grant select on test.* to юзер_юзер@localhost;
user()
юзер_юзер@localhost
revoke all on test.* from юзер_юзер@localhost;
drop user юзер_юзер@localhost;
create database имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
use имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
select database();
database()
имя_базы_в_кодировке_утф8_длиной_больше_чем_45
drop database имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
use test;
CREATE TABLE t1(id varchar(20) NOT NULL) DEFAULT CHARSET=utf8;
INSERT INTO t1 VALUES ('xxx'), ('aa'), ('yyy'), ('aa');
SELECT id FROM t1;
...
...
mysql-test/t/ctype_utf8.test
View file @
437c9431
...
...
@@ -1069,23 +1069,6 @@ explain select a from t1 group by a;
select
a
from
t1
group
by
a
;
drop
table
t1
;
#
# Bug#20393: User name truncation in mysql client
# Bug#21432: Database/Table name limited to 64 bytes, not chars, problems with multi-byte
#
set
names
utf8
;
#create user юзер_юзер@localhost;
grant
select
on
test
.*
to
юзер_юзер
@
localhost
;
--
exec
$MYSQL
--
default
-
character
-
set
=
utf8
--
user
=
юзер_юзер
-
e
"select user()"
revoke
all
on
test
.*
from
юзер_юзер
@
localhost
;
drop
user
юзер_юзер
@
localhost
;
create
database
имя_базы_в_кодировке_утф8_длиной_больше_чем_45
;
use
имя_базы_в_кодировке_утф8_длиной_больше_чем_45
;
select
database
();
drop
database
имя_базы_в_кодировке_утф8_длиной_больше_чем_45
;
use
test
;
# End of 4.1 tests
#
...
...
sql-common/client.c
View file @
437c9431
...
...
@@ -1758,7 +1758,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
const
char
*
passwd
,
const
char
*
db
,
uint
port
,
const
char
*
unix_socket
,
ulong
client_flag
)
{
char
buff
[
NAME_
BYTE_LEN
+
USERNAME_BYT
E_LENGTH
+
100
];
char
buff
[
NAME_
LEN
+
USERNAM
E_LENGTH
+
100
];
char
*
end
,
*
host_info
;
my_socket
sock
;
in_addr_t
ip_addr
;
...
...
@@ -2217,7 +2217,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
mysql
->
server_status
,
client_flag
));
/* This needs to be changed as it's not useful with big packets */
if
(
user
&&
user
[
0
])
strmake
(
end
,
user
,
USERNAME_
BYTE_
LENGTH
);
/* Max user name */
strmake
(
end
,
user
,
USERNAME_LENGTH
);
/* Max user name */
else
read_user_name
((
char
*
)
end
);
...
...
@@ -2247,7 +2247,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
/* Add database if needed */
if
(
db
&&
(
mysql
->
server_capabilities
&
CLIENT_CONNECT_WITH_DB
))
{
end
=
strmake
(
end
,
db
,
NAME_
BYTE_
LEN
)
+
1
;
end
=
strmake
(
end
,
db
,
NAME_LEN
)
+
1
;
mysql
->
db
=
my_strdup
(
db
,
MYF
(
MY_WME
));
db
=
0
;
}
...
...
sql/sql_acl.cc
View file @
437c9431
...
...
@@ -3232,10 +3232,11 @@ bool mysql_grant(THD *thd, const char *db, List <LEX_USER> &list,
result
=
TRUE
;
continue
;
}
if
(
replace_user_table
(
thd
,
tables
[
0
].
table
,
*
Str
,
(
!
db
?
rights
:
0
),
revoke_grant
,
create_new_users
,
test
(
thd
->
variables
.
sql_mode
&
MODE_NO_AUTO_CREATE_USER
)))
if
((
replace_user_table
(
thd
,
tables
[
0
].
table
,
*
Str
,
(
!
db
?
rights
:
0
),
revoke_grant
,
create_new_users
)))
result
=
-
1
;
else
if
(
db
)
{
...
...
sql/sql_parse.cc
View file @
437c9431
...
...
@@ -1001,8 +1001,8 @@ static int check_connection(THD *thd)
char
*
passwd
=
strend
(
user
)
+
1
;
uint
user_len
=
passwd
-
user
-
1
;
char
*
db
=
passwd
;
char
db_buff
[
NAME_
BYTE_LEN
+
1
];
// buffer to store db in utf8
char
user_buff
[
USERNAME_
BYTE_
LENGTH
+
1
];
// buffer to store user in utf8
char
db_buff
[
NAME_
LEN
+
1
];
// buffer to store db in utf8
char
user_buff
[
USERNAME_LENGTH
+
1
];
// buffer to store user in utf8
uint
dummy_errors
;
/*
...
...
sql/table.cc
View file @
437c9431
...
...
@@ -1592,7 +1592,7 @@ char *get_field(MEM_ROOT *mem, Field *field)
bool
check_db_name
(
char
*
name
)
{
uint
name_length
=
0
;
// name length in symbols
char
*
start
=
name
;
/* Used to catch empty names and names with end space */
bool
last_char_is_space
=
TRUE
;
...
...
@@ -1609,7 +1609,6 @@ bool check_db_name(char *name)
name
+
system_charset_info
->
mbmaxlen
);
if
(
len
)
{
name_length
++
;
name
+=
len
;
continue
;
}
...
...
@@ -1617,13 +1616,12 @@ bool check_db_name(char *name)
#else
last_char_is_space
=
*
name
==
' '
;
#endif
name_length
++
;
if
(
*
name
==
'/'
||
*
name
==
'\\'
||
*
name
==
FN_LIBCHAR
||
*
name
==
FN_EXTCHAR
)
return
1
;
name
++
;
}
return
(
last_char_is_space
||
name_length
>
NAME_LEN
)
;
return
last_char_is_space
||
(
uint
)
(
name
-
start
)
>
NAME_LEN
;
}
...
...
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