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
e2684ad5
Commit
e2684ad5
authored
Sep 07, 2006
by
gluh@mysql.com/gluh.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
after merge fix
parent
76b97433
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
30 additions
and
25 deletions
+30
-25
include/mysql_com.h
include/mysql_com.h
+1
-1
mysql-test/r/ctype_utf8.result
mysql-test/r/ctype_utf8.result
+9
-8
mysql-test/t/ctype_utf8.test
mysql-test/t/ctype_utf8.test
+1
-0
sql/sp.cc
sql/sp.cc
+4
-4
sql/sp_head.cc
sql/sp_head.cc
+3
-3
sql/sql_acl.cc
sql/sql_acl.cc
+5
-5
sql/sql_class.h
sql/sql_class.h
+1
-1
sql/sql_parse.cc
sql/sql_parse.cc
+5
-2
sql/sql_repl.h
sql/sql_repl.h
+1
-1
No files found.
include/mysql_com.h
View file @
e2684ad5
...
...
@@ -36,7 +36,7 @@
MySQL standard format:
user_name_part@host_name_part\0
*/
#define USER_HOST_BUFF_SIZE HOSTNAME_LENGTH + USERNAME_LENGTH + 2
#define USER_HOST_BUFF_SIZE HOSTNAME_LENGTH + USERNAME_
BYTE_
LENGTH + 2
#define LOCAL_HOST "localhost"
#define LOCAL_HOST_NAMEDPIPE "."
...
...
mysql-test/r/ctype_utf8.result
View file @
e2684ad5
...
...
@@ -1341,17 +1341,18 @@ a
e
drop table t1;
set names utf8;
grant select on test.* to
<8e>зе<80>_<8e>зе<80>
@localhost;
grant select on test.* to
юзер_юзер
@localhost;
user()
<8e>зе<80>_<8e>зе<80>
@localhost
revoke all on test.* from
<8e>зе<80>_<8e>зе<80>
@localhost;
drop user
<8e>зе<80>_<8e>зе<80>
@localhost;
create database им
<8f>_баз<8b>_в_коди<80>овке_<83><82><84>8_длиной_бол<8c><88>е_<87>
ем_45;
use им
<8f>_баз<8b>_в_коди<80>овке_<83><82><84>8_длиной_бол<8c><88>е_<87>
ем_45;
юзер_юзер
@localhost
revoke all on test.* from
юзер_юзер
@localhost;
drop user
юзер_юзер
@localhost;
create database им
я_базы_в_кодировке_утф8_длиной_больше_ч
ем_45;
use им
я_базы_в_кодировке_утф8_длиной_больше_ч
ем_45;
select database();
database()
им<8f>_баз<8b>_в_коди<80>овке_<83><82><84>8_длиной_бол<8c><88>е_<87>ем_45
drop database им<8f>_баз<8b>_в_коди<80>овке_<83><82><84>8_длиной_бол<8c><88>е_<87>ем_45;
имя_базы_в_кодировке_утф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 @
e2684ad5
...
...
@@ -1084,6 +1084,7 @@ create database имя_базы_в_кодировке_утф8_длиной_бо
use
имя_базы_в_кодировке_утф8_длиной_больше_чем_45
;
select
database
();
drop
database
имя_базы_в_кодировке_утф8_длиной_больше_чем_45
;
use
test
;
# End of 4.1 tests
...
...
sql/sp.cc
View file @
e2684ad5
...
...
@@ -404,16 +404,16 @@ db_load_routine(THD *thd, int type, sp_name *name, sp_head **sphp,
{
LEX
*
old_lex
=
thd
->
lex
,
newlex
;
String
defstr
;
char
old_db_buf
[
NAME_LEN
+
1
];
char
old_db_buf
[
NAME_
BYTE_
LEN
+
1
];
LEX_STRING
old_db
=
{
old_db_buf
,
sizeof
(
old_db_buf
)
};
bool
dbchanged
;
ulong
old_sql_mode
=
thd
->
variables
.
sql_mode
;
ha_rows
old_select_limit
=
thd
->
variables
.
select_limit
;
sp_rcontext
*
old_spcont
=
thd
->
spcont
;
char
definer_user_name_holder
[
USERNAME_LENGTH
+
1
];
char
definer_user_name_holder
[
USERNAME_
BYTE_
LENGTH
+
1
];
LEX_STRING_WITH_INIT
definer_user_name
(
definer_user_name_holder
,
USERNAME_LENGTH
);
USERNAME_
BYTE_
LENGTH
);
char
definer_host_name_holder
[
HOSTNAME_LENGTH
+
1
];
LEX_STRING_WITH_INIT
definer_host_name
(
definer_host_name_holder
,
...
...
@@ -511,7 +511,7 @@ db_create_routine(THD *thd, int type, sp_head *sp)
int
ret
;
TABLE
*
table
;
char
definer
[
USER_HOST_BUFF_SIZE
];
char
old_db_buf
[
NAME_LEN
+
1
];
char
old_db_buf
[
NAME_
BYTE_
LEN
+
1
];
LEX_STRING
old_db
=
{
old_db_buf
,
sizeof
(
old_db_buf
)
};
bool
dbchanged
;
DBUG_ENTER
(
"db_create_routine"
);
...
...
sql/sp_head.cc
View file @
e2684ad5
...
...
@@ -924,7 +924,7 @@ bool
sp_head
::
execute
(
THD
*
thd
)
{
DBUG_ENTER
(
"sp_head::execute"
);
char
old_db_buf
[
NAME_LEN
+
1
];
char
old_db_buf
[
NAME_
BYTE_
LEN
+
1
];
LEX_STRING
old_db
=
{
old_db_buf
,
sizeof
(
old_db_buf
)
};
bool
dbchanged
;
sp_rcontext
*
ctx
;
...
...
@@ -1957,8 +1957,8 @@ sp_head::set_info(longlong created, longlong modified,
void
sp_head
::
set_definer
(
const
char
*
definer
,
uint
definerlen
)
{
char
user_name_holder
[
USERNAME_LENGTH
+
1
];
LEX_STRING_WITH_INIT
user_name
(
user_name_holder
,
USERNAME_LENGTH
);
char
user_name_holder
[
USERNAME_
BYTE_
LENGTH
+
1
];
LEX_STRING_WITH_INIT
user_name
(
user_name_holder
,
USERNAME_
BYTE_
LENGTH
);
char
host_name_holder
[
HOSTNAME_LENGTH
+
1
];
LEX_STRING_WITH_INIT
host_name
(
host_name_holder
,
HOSTNAME_LENGTH
);
...
...
sql/sql_acl.cc
View file @
e2684ad5
...
...
@@ -54,7 +54,7 @@ static byte* acl_entry_get_key(acl_entry *entry,uint *length,
}
#define IP_ADDR_STRLEN (3+1+3+1+3+1+3)
#define ACL_KEY_LENGTH (IP_ADDR_STRLEN+1+NAME_
LEN+1+USERNAM
E_LENGTH+1)
#define ACL_KEY_LENGTH (IP_ADDR_STRLEN+1+NAME_
BYTE_LEN+1+USERNAME_BYT
E_LENGTH+1)
static
DYNAMIC_ARRAY
acl_hosts
,
acl_users
,
acl_dbs
;
static
MEM_ROOT
mem
,
memex
;
...
...
@@ -197,7 +197,7 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables)
READ_RECORD
read_record_info
;
my_bool
return_val
=
1
;
bool
check_no_resolve
=
specialflag
&
SPECIAL_NO_RESOLVE
;
char
tmp_name
[
NAME_LEN
+
1
];
char
tmp_name
[
NAME_
BYTE_
LEN
+
1
];
int
password_length
;
DBUG_ENTER
(
"acl_load"
);
...
...
@@ -2264,7 +2264,7 @@ static GRANT_NAME *name_hash_search(HASH *name_hash,
const
char
*
user
,
const
char
*
tname
,
bool
exact
)
{
char
helping
[
NAME_
LEN
*
2
+
USERNAM
E_LENGTH
+
3
];
char
helping
[
NAME_
BYTE_LEN
*
2
+
USERNAME_BYT
E_LENGTH
+
3
];
uint
len
;
GRANT_NAME
*
grant_name
,
*
found
=
0
;
HASH_SEARCH_STATE
state
;
...
...
@@ -3167,7 +3167,7 @@ bool mysql_grant(THD *thd, const char *db, List <LEX_USER> &list,
{
List_iterator
<
LEX_USER
>
str_list
(
list
);
LEX_USER
*
Str
,
*
tmp_Str
;
char
tmp_db
[
NAME_LEN
+
1
];
char
tmp_db
[
NAME_
BYTE_
LEN
+
1
];
bool
create_new_users
=
0
;
TABLE_LIST
tables
[
2
];
DBUG_ENTER
(
"mysql_grant"
);
...
...
@@ -3867,7 +3867,7 @@ err2:
bool
check_grant_db
(
THD
*
thd
,
const
char
*
db
)
{
Security_context
*
sctx
=
thd
->
security_ctx
;
char
helping
[
NAME_
LEN
+
USERNAM
E_LENGTH
+
2
];
char
helping
[
NAME_
BYTE_LEN
+
USERNAME_BYT
E_LENGTH
+
2
];
uint
len
;
bool
error
=
1
;
...
...
sql/sql_class.h
View file @
e2684ad5
...
...
@@ -200,7 +200,7 @@ class MYSQL_LOG: public TC_LOG
IO_CACHE
log_file
;
IO_CACHE
index_file
;
char
*
name
;
char
time_buff
[
20
],
db
[
NAME_LEN
+
1
];
char
time_buff
[
20
],
db
[
NAME_
BYTE_
LEN
+
1
];
char
log_file_name
[
FN_REFLEN
],
index_file_name
[
FN_REFLEN
];
/*
The max size before rotation (usable only if log_type == LOG_BIN: binary
...
...
sql/sql_parse.cc
View file @
e2684ad5
...
...
@@ -1662,7 +1662,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
password. New clients send the size (1 byte) + string (not null
terminated, so also '\0' for empty string).
*/
char
db_buff
[
NAME_
LEN
+
1
];
// buffer to store db in utf8
char
db_buff
[
NAME_
BYTE_LEN
+
1
];
// buffer to store db in utf8
char
*
db
=
passwd
;
uint
passwd_len
=
thd
->
client_capabilities
&
CLIENT_SECURE_CONNECTION
?
*
passwd
++
:
strlen
(
passwd
);
...
...
@@ -7564,7 +7564,10 @@ LEX_USER *get_current_user(THD *thd, LEX_USER *user)
bool
check_string_length
(
LEX_STRING
*
str
,
const
char
*
err_msg
,
uint
max_length
)
{
if
(
str
->
length
<=
max_length
)
if
(
system_charset_info
->
cset
->
charpos
(
system_charset_info
,
str
->
str
,
str
->
str
+
str
->
length
,
max_length
)
>=
str
->
length
)
return
FALSE
;
my_error
(
ER_WRONG_STRING_LENGTH
,
MYF
(
0
),
str
->
str
,
err_msg
,
max_length
);
...
...
sql/sql_repl.h
View file @
e2684ad5
...
...
@@ -22,7 +22,7 @@ typedef struct st_slave_info
uint32
server_id
;
uint32
rpl_recovery_rank
,
master_id
;
char
host
[
HOSTNAME_LENGTH
+
1
];
char
user
[
USERNAME_LENGTH
+
1
];
char
user
[
USERNAME_
BYTE_
LENGTH
+
1
];
char
password
[
MAX_PASSWORD_LENGTH
+
1
];
uint16
port
;
THD
*
thd
;
...
...
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