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
6db2602a
Commit
6db2602a
authored
Jul 13, 2005
by
lars@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/bkroot/mysql-4.1
into mysql.com:/home/bk/mysql-5.0
parents
f19814be
c31d71c0
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
48 additions
and
13 deletions
+48
-13
include/my_global.h
include/my_global.h
+1
-1
mysql-test/r/func_des_encrypt.result
mysql-test/r/func_des_encrypt.result
+3
-0
mysql-test/t/func_des_encrypt.test
mysql-test/t/func_des_encrypt.test
+9
-0
sql/des_key_file.cc
sql/des_key_file.cc
+12
-6
sql/item_strfunc.cc
sql/item_strfunc.cc
+11
-0
sql/log.cc
sql/log.cc
+3
-0
sql/mysql_priv.h
sql/mysql_priv.h
+1
-0
sql/net_serv.cc
sql/net_serv.cc
+1
-1
sql/slave.cc
sql/slave.cc
+2
-0
vio/vio.c
vio/vio.c
+2
-2
vio/viosocket.c
vio/viosocket.c
+2
-2
zlib/inftrees.c
zlib/inftrees.c
+1
-1
No files found.
include/my_global.h
View file @
6db2602a
...
@@ -830,7 +830,7 @@ typedef off_t os_off_t;
...
@@ -830,7 +830,7 @@ typedef off_t os_off_t;
#define socket_errno WSAGetLastError()
#define socket_errno WSAGetLastError()
#define SOCKET_EINTR WSAEINTR
#define SOCKET_EINTR WSAEINTR
#define SOCKET_EAGAIN WSAEINPROGRESS
#define SOCKET_EAGAIN WSAEINPROGRESS
#define SOCKET_EWOULDBLOCK WSAE
INPROGRESS
#define SOCKET_EWOULDBLOCK WSAE
WOULDBLOCK
#define SOCKET_ENFILE ENFILE
#define SOCKET_ENFILE ENFILE
#define SOCKET_EMFILE EMFILE
#define SOCKET_EMFILE EMFILE
#elif defined(OS2)
#elif defined(OS2)
...
...
mysql-test/r/func_des_encrypt.result
0 → 100644
View file @
6db2602a
select des_encrypt('hello');
des_encrypt('hello')
€Ö2nV“Ø}
mysql-test/t/func_des_encrypt.test
0 → 100644
View file @
6db2602a
--
source
include
/
have_openssl
.
inc
# This test can't be in func_encrypt.test, because it requires
# --des-key-file to not be set.
#
# Bug #11643: des_encrypt() causes server to die
#
select
des_encrypt
(
'hello'
);
sql/des_key_file.cc
View file @
6db2602a
...
@@ -22,7 +22,17 @@
...
@@ -22,7 +22,17 @@
struct
st_des_keyschedule
des_keyschedule
[
10
];
struct
st_des_keyschedule
des_keyschedule
[
10
];
uint
des_default_key
;
uint
des_default_key
;
pthread_mutex_t
LOCK_des_key_file
;
pthread_mutex_t
LOCK_des_key_file
;
static
int
initialized
;
static
int
initialized
=
0
;
void
init_des_key_file
()
{
if
(
!
initialized
)
{
initialized
=
1
;
pthread_mutex_init
(
&
LOCK_des_key_file
,
MY_MUTEX_INIT_FAST
);
}
}
/*
/*
Function which loads DES keys from plaintext file into memory on MySQL
Function which loads DES keys from plaintext file into memory on MySQL
...
@@ -45,11 +55,7 @@ load_des_key_file(const char *file_name)
...
@@ -45,11 +55,7 @@ load_des_key_file(const char *file_name)
DBUG_ENTER
(
"load_des_key_file"
);
DBUG_ENTER
(
"load_des_key_file"
);
DBUG_PRINT
(
"enter"
,(
"name: %s"
,
file_name
));
DBUG_PRINT
(
"enter"
,(
"name: %s"
,
file_name
));
if
(
!
initialized
)
init_des_key_file
();
{
initialized
=
1
;
pthread_mutex_init
(
&
LOCK_des_key_file
,
MY_MUTEX_INIT_FAST
);
}
VOID
(
pthread_mutex_lock
(
&
LOCK_des_key_file
));
VOID
(
pthread_mutex_lock
(
&
LOCK_des_key_file
));
if
((
file
=
my_open
(
file_name
,
O_RDONLY
|
O_BINARY
,
MYF
(
MY_WME
)))
<
0
||
if
((
file
=
my_open
(
file_name
,
O_RDONLY
|
O_BINARY
,
MYF
(
MY_WME
)))
<
0
||
...
...
sql/item_strfunc.cc
View file @
6db2602a
...
@@ -378,6 +378,9 @@ String *Item_func_des_encrypt::val_str(String *str)
...
@@ -378,6 +378,9 @@ String *Item_func_des_encrypt::val_str(String *str)
if
(
arg_count
==
1
)
if
(
arg_count
==
1
)
{
{
/* Make sure LOCK_des_key_file was initialized. */
init_des_key_file
();
/* Protect against someone doing FLUSH DES_KEY_FILE */
/* Protect against someone doing FLUSH DES_KEY_FILE */
VOID
(
pthread_mutex_lock
(
&
LOCK_des_key_file
));
VOID
(
pthread_mutex_lock
(
&
LOCK_des_key_file
));
keyschedule
=
des_keyschedule
[
key_number
=
des_default_key
];
keyschedule
=
des_keyschedule
[
key_number
=
des_default_key
];
...
@@ -388,6 +391,10 @@ String *Item_func_des_encrypt::val_str(String *str)
...
@@ -388,6 +391,10 @@ String *Item_func_des_encrypt::val_str(String *str)
key_number
=
(
uint
)
args
[
1
]
->
val_int
();
key_number
=
(
uint
)
args
[
1
]
->
val_int
();
if
(
key_number
>
9
)
if
(
key_number
>
9
)
goto
error
;
goto
error
;
/* Make sure LOCK_des_key_file was initialized. */
init_des_key_file
();
VOID
(
pthread_mutex_lock
(
&
LOCK_des_key_file
));
VOID
(
pthread_mutex_lock
(
&
LOCK_des_key_file
));
keyschedule
=
des_keyschedule
[
key_number
];
keyschedule
=
des_keyschedule
[
key_number
];
VOID
(
pthread_mutex_unlock
(
&
LOCK_des_key_file
));
VOID
(
pthread_mutex_unlock
(
&
LOCK_des_key_file
));
...
@@ -474,6 +481,10 @@ String *Item_func_des_decrypt::val_str(String *str)
...
@@ -474,6 +481,10 @@ String *Item_func_des_decrypt::val_str(String *str)
// Check if automatic key and that we have privilege to uncompress using it
// Check if automatic key and that we have privilege to uncompress using it
if
(
!
(
current_thd
->
master_access
&
SUPER_ACL
)
||
key_number
>
9
)
if
(
!
(
current_thd
->
master_access
&
SUPER_ACL
)
||
key_number
>
9
)
goto
error
;
goto
error
;
/* Make sure LOCK_des_key_file was initialized. */
init_des_key_file
();
VOID
(
pthread_mutex_lock
(
&
LOCK_des_key_file
));
VOID
(
pthread_mutex_lock
(
&
LOCK_des_key_file
));
keyschedule
=
des_keyschedule
[
key_number
];
keyschedule
=
des_keyschedule
[
key_number
];
VOID
(
pthread_mutex_unlock
(
&
LOCK_des_key_file
));
VOID
(
pthread_mutex_unlock
(
&
LOCK_des_key_file
));
...
...
sql/log.cc
View file @
6db2602a
...
@@ -1154,6 +1154,9 @@ int MYSQL_LOG::purge_logs(const char *to_log,
...
@@ -1154,6 +1154,9 @@ int MYSQL_LOG::purge_logs(const char *to_log,
*/
*/
if
(
my_stat
(
log_info
.
log_file_name
,
&
s
,
MYF
(
0
)))
if
(
my_stat
(
log_info
.
log_file_name
,
&
s
,
MYF
(
0
)))
file_size
=
s
.
st_size
;
file_size
=
s
.
st_size
;
else
sql_print_information
(
"Failed to execute my_stat on file '%s'"
,
log_info
.
log_file_name
);
}
}
/*
/*
It's not fatal if we can't delete a log file ;
It's not fatal if we can't delete a log file ;
...
...
sql/mysql_priv.h
View file @
6db2602a
...
@@ -786,6 +786,7 @@ extern char *des_key_file;
...
@@ -786,6 +786,7 @@ extern char *des_key_file;
extern
struct
st_des_keyschedule
des_keyschedule
[
10
];
extern
struct
st_des_keyschedule
des_keyschedule
[
10
];
extern
uint
des_default_key
;
extern
uint
des_default_key
;
extern
pthread_mutex_t
LOCK_des_key_file
;
extern
pthread_mutex_t
LOCK_des_key_file
;
void
init_des_key_file
();
bool
load_des_key_file
(
const
char
*
file_name
);
bool
load_des_key_file
(
const
char
*
file_name
);
void
free_des_key_file
();
void
free_des_key_file
();
#endif
/* HAVE_OPENSSL */
#endif
/* HAVE_OPENSSL */
...
...
sql/net_serv.cc
View file @
6db2602a
...
@@ -135,7 +135,7 @@ my_bool my_net_init(NET *net, Vio* vio)
...
@@ -135,7 +135,7 @@ my_bool my_net_init(NET *net, Vio* vio)
if
(
vio
!=
0
)
/* If real connection */
if
(
vio
!=
0
)
/* If real connection */
{
{
net
->
fd
=
vio_fd
(
vio
);
/* For perl DBI/DBD */
net
->
fd
=
vio_fd
(
vio
);
/* For perl DBI/DBD */
#if defined(MYSQL_SERVER) && !defined(__
_
WIN__) && !defined(__EMX__) && !defined(OS2)
#if defined(MYSQL_SERVER) && !defined(__WIN__) && !defined(__EMX__) && !defined(OS2)
if
(
!
(
test_flags
&
TEST_BLOCKING
))
if
(
!
(
test_flags
&
TEST_BLOCKING
))
{
{
my_bool
old_mode
;
my_bool
old_mode
;
...
...
sql/slave.cc
View file @
6db2602a
...
@@ -4968,6 +4968,7 @@ void rotate_relay_log(MASTER_INFO* mi)
...
@@ -4968,6 +4968,7 @@ void rotate_relay_log(MASTER_INFO* mi)
/* We don't lock rli->run_lock. This would lead to deadlocks. */
/* We don't lock rli->run_lock. This would lead to deadlocks. */
pthread_mutex_lock
(
&
mi
->
run_lock
);
pthread_mutex_lock
(
&
mi
->
run_lock
);
pthread_mutex_lock
(
&
mi
->
data_lock
);
/*
/*
We need to test inited because otherwise, new_file() will attempt to lock
We need to test inited because otherwise, new_file() will attempt to lock
...
@@ -4997,6 +4998,7 @@ void rotate_relay_log(MASTER_INFO* mi)
...
@@ -4997,6 +4998,7 @@ void rotate_relay_log(MASTER_INFO* mi)
*/
*/
rli
->
relay_log
.
harvest_bytes_written
(
&
rli
->
log_space_total
);
rli
->
relay_log
.
harvest_bytes_written
(
&
rli
->
log_space_total
);
end:
end:
pthread_mutex_unlock
(
&
mi
->
data_lock
);
pthread_mutex_unlock
(
&
mi
->
run_lock
);
pthread_mutex_unlock
(
&
mi
->
run_lock
);
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
...
...
vio/vio.c
View file @
6db2602a
...
@@ -143,7 +143,7 @@ Vio *vio_new(my_socket sd, enum enum_vio_type type, uint flags)
...
@@ -143,7 +143,7 @@ Vio *vio_new(my_socket sd, enum enum_vio_type type, uint flags)
sprintf
(
vio
->
desc
,
sprintf
(
vio
->
desc
,
(
vio
->
type
==
VIO_TYPE_SOCKET
?
"socket (%d)"
:
"TCP/IP (%d)"
),
(
vio
->
type
==
VIO_TYPE_SOCKET
?
"socket (%d)"
:
"TCP/IP (%d)"
),
vio
->
sd
);
vio
->
sd
);
#if !defined(__
_
WIN__) && !defined(__EMX__) && !defined(OS2)
#if !defined(__WIN__) && !defined(__EMX__) && !defined(OS2)
#if !defined(NO_FCNTL_NONBLOCK)
#if !defined(NO_FCNTL_NONBLOCK)
#if defined(__FreeBSD__)
#if defined(__FreeBSD__)
fcntl
(
sd
,
F_SETFL
,
vio
->
fcntl_mode
);
/* Yahoo! FreeBSD patch */
fcntl
(
sd
,
F_SETFL
,
vio
->
fcntl_mode
);
/* Yahoo! FreeBSD patch */
...
@@ -158,7 +158,7 @@ Vio *vio_new(my_socket sd, enum enum_vio_type type, uint flags)
...
@@ -158,7 +158,7 @@ Vio *vio_new(my_socket sd, enum enum_vio_type type, uint flags)
{
{
/* set to blocking mode by default */
/* set to blocking mode by default */
ulong
arg
=
0
,
r
;
ulong
arg
=
0
,
r
;
r
=
ioctlsocket
(
sd
,
FIONBIO
,(
void
*
)
&
arg
,
sizeof
(
arg
)
);
r
=
ioctlsocket
(
sd
,
FIONBIO
,(
void
*
)
&
arg
);
vio
->
fcntl_mode
&=
~
O_NONBLOCK
;
vio
->
fcntl_mode
&=
~
O_NONBLOCK
;
}
}
#endif
#endif
...
...
vio/viosocket.c
View file @
6db2602a
...
@@ -128,7 +128,7 @@ int vio_blocking(Vio * vio __attribute__((unused)), my_bool set_blocking_mode,
...
@@ -128,7 +128,7 @@ int vio_blocking(Vio * vio __attribute__((unused)), my_bool set_blocking_mode,
DBUG_PRINT
(
"enter"
,
(
"set_blocking_mode: %d old_mode: %d"
,
DBUG_PRINT
(
"enter"
,
(
"set_blocking_mode: %d old_mode: %d"
,
(
int
)
set_blocking_mode
,
(
int
)
*
old_mode
));
(
int
)
set_blocking_mode
,
(
int
)
*
old_mode
));
#if !defined(__
_
WIN__) && !defined(__EMX__)
#if !defined(__WIN__) && !defined(__EMX__)
#if !defined(NO_FCNTL_NONBLOCK)
#if !defined(NO_FCNTL_NONBLOCK)
if
(
vio
->
sd
>=
0
)
if
(
vio
->
sd
>=
0
)
{
{
...
@@ -161,7 +161,7 @@ int vio_blocking(Vio * vio __attribute__((unused)), my_bool set_blocking_mode,
...
@@ -161,7 +161,7 @@ int vio_blocking(Vio * vio __attribute__((unused)), my_bool set_blocking_mode,
vio
->
fcntl_mode
|=
O_NONBLOCK
;
/* set bit */
vio
->
fcntl_mode
|=
O_NONBLOCK
;
/* set bit */
}
}
if
(
old_fcntl
!=
vio
->
fcntl_mode
)
if
(
old_fcntl
!=
vio
->
fcntl_mode
)
r
=
ioctlsocket
(
vio
->
sd
,
FIONBIO
,(
void
*
)
&
arg
,
sizeof
(
arg
)
);
r
=
ioctlsocket
(
vio
->
sd
,
FIONBIO
,(
void
*
)
&
arg
);
}
}
#ifndef __EMX__
#ifndef __EMX__
else
else
...
...
zlib/inftrees.c
View file @
6db2602a
...
@@ -134,7 +134,7 @@ unsigned short FAR *work;
...
@@ -134,7 +134,7 @@ unsigned short FAR *work;
left
-=
count
[
len
];
left
-=
count
[
len
];
if
(
left
<
0
)
return
-
1
;
/* over-subscribed */
if
(
left
<
0
)
return
-
1
;
/* over-subscribed */
}
}
if
(
left
>
0
&&
(
type
==
CODES
||
(
codes
-
count
[
0
]
!=
1
)
))
if
(
left
>
0
&&
(
type
==
CODES
||
max
!=
1
))
return
-
1
;
/* incomplete set */
return
-
1
;
/* incomplete set */
/* generate offsets into symbol table for each length for sorting */
/* generate offsets into symbol table for each length for sorting */
...
...
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